; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 ; Bound: 114 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %main "main" %position_1 %view_position_1 %normal_1 %uv_1 %color_1 %color_2 OpExecutionMode %main OriginUpperLeft OpName %position_1 "position_1" OpName %view_position_1 "view_position_1" OpName %normal_1 "normal_1" OpName %uv_1 "uv_1" OpName %color_1 "color_1" OpName %color_2 "color_2" OpName %Uniforms "Uniforms" OpMemberName %Uniforms 0 "worldView" OpMemberName %Uniforms 1 "proj" OpMemberName %Uniforms 2 "numPointLights" OpMemberName %Uniforms 3 "color_source" OpMemberName %Uniforms 4 "color" OpName %uniforms "uniforms" OpName %PointLights "PointLights" OpMemberName %PointLights 0 "values" OpName %PointLight "PointLight" OpMemberName %PointLight 0 "position" OpName %pointLights "pointLights" OpName %mySampler "mySampler" OpName %myTexture "myTexture" OpName %FragmentInput "FragmentInput" OpMemberName %FragmentInput 0 "position" OpMemberName %FragmentInput 1 "view_position" OpMemberName %FragmentInput 2 "normal" OpMemberName %FragmentInput 3 "uv" OpMemberName %FragmentInput 4 "color" OpName %getColor "getColor" OpName %fragment "fragment" OpName %color "color" OpName %FragmentOutput "FragmentOutput" OpMemberName %FragmentOutput 0 "color" OpName %main_inner "main_inner" OpName %fragment_0 "fragment" OpName %output "output" OpName %main "main" OpDecorate %position_1 BuiltIn FragCoord OpDecorate %view_position_1 Location 0 OpDecorate %normal_1 Location 1 OpDecorate %uv_1 Location 2 OpDecorate %color_1 Location 3 OpDecorate %color_2 Location 0 OpDecorate %Uniforms Block OpMemberDecorate %Uniforms 0 Offset 0 OpMemberDecorate %Uniforms 0 ColMajor OpMemberDecorate %Uniforms 0 MatrixStride 16 OpMemberDecorate %Uniforms 1 Offset 64 OpMemberDecorate %Uniforms 1 ColMajor OpMemberDecorate %Uniforms 1 MatrixStride 16 OpMemberDecorate %Uniforms 2 Offset 128 OpMemberDecorate %Uniforms 3 Offset 132 OpMemberDecorate %Uniforms 4 Offset 144 OpDecorate %uniforms NonWritable OpDecorate %uniforms Binding 0 OpDecorate %uniforms DescriptorSet 0 OpDecorate %PointLights Block OpMemberDecorate %PointLights 0 Offset 0 OpMemberDecorate %PointLight 0 Offset 0 OpDecorate %_runtimearr_PointLight ArrayStride 16 OpDecorate %pointLights NonWritable OpDecorate %pointLights Binding 1 OpDecorate %pointLights DescriptorSet 0 OpDecorate %mySampler Binding 2 OpDecorate %mySampler DescriptorSet 0 OpDecorate %myTexture Binding 3 OpDecorate %myTexture DescriptorSet 0 OpMemberDecorate %FragmentInput 0 Offset 0 OpMemberDecorate %FragmentInput 1 Offset 16 OpMemberDecorate %FragmentInput 2 Offset 32 OpMemberDecorate %FragmentInput 3 Offset 48 OpMemberDecorate %FragmentInput 4 Offset 64 OpMemberDecorate %FragmentOutput 0 Offset 0 %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 %_ptr_Input_v4float = OpTypePointer Input %v4float %position_1 = OpVariable %_ptr_Input_v4float Input %view_position_1 = OpVariable %_ptr_Input_v4float Input %normal_1 = OpVariable %_ptr_Input_v4float Input %v2float = OpTypeVector %float 2 %_ptr_Input_v2float = OpTypePointer Input %v2float %uv_1 = OpVariable %_ptr_Input_v2float Input %color_1 = OpVariable %_ptr_Input_v4float Input %_ptr_Output_v4float = OpTypePointer Output %v4float %13 = OpConstantNull %v4float %color_2 = OpVariable %_ptr_Output_v4float Output %13 %mat4v4float = OpTypeMatrix %v4float 4 %uint = OpTypeInt 32 0 %Uniforms = OpTypeStruct %mat4v4float %mat4v4float %uint %uint %v4float %_ptr_Uniform_Uniforms = OpTypePointer Uniform %Uniforms %uniforms = OpVariable %_ptr_Uniform_Uniforms Uniform %PointLight = OpTypeStruct %v4float %_runtimearr_PointLight = OpTypeRuntimeArray %PointLight %PointLights = OpTypeStruct %_runtimearr_PointLight %_ptr_StorageBuffer_PointLights = OpTypePointer StorageBuffer %PointLights %pointLights = OpVariable %_ptr_StorageBuffer_PointLights StorageBuffer %26 = OpTypeSampler %_ptr_UniformConstant_26 = OpTypePointer UniformConstant %26 %mySampler = OpVariable %_ptr_UniformConstant_26 UniformConstant %29 = OpTypeImage %float 2D 0 0 0 1 Unknown %_ptr_UniformConstant_29 = OpTypePointer UniformConstant %29 %myTexture = OpVariable %_ptr_UniformConstant_29 UniformConstant %FragmentInput = OpTypeStruct %v4float %v4float %v4float %v2float %v4float %30 = OpTypeFunction %v4float %FragmentInput %_ptr_Function_v4float = OpTypePointer Function %v4float %uint_3 = OpConstant %uint 3 %_ptr_Uniform_uint = OpTypePointer Uniform %uint %uint_0 = OpConstant %uint 0 %bool = OpTypeBool %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float %float_1 = OpConstant %float 1 %uint_2 = OpConstant %uint 2 %uint_4 = OpConstant %uint 4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %78 = OpTypeSampledImage %29 %FragmentOutput = OpTypeStruct %v4float %82 = OpTypeFunction %FragmentOutput %FragmentInput %_ptr_Function_FragmentOutput = OpTypePointer Function %FragmentOutput %89 = OpConstantNull %FragmentOutput %float_0 = OpConstant %float 0 %92 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %void = OpTypeVoid %103 = OpTypeFunction %void %getColor = OpFunction %v4float None %30 %fragment = OpFunctionParameter %FragmentInput %34 = OpLabel %color = OpVariable %_ptr_Function_v4float Function %13 %39 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_3 %40 = OpLoad %uint %39 %42 = OpIEqual %bool %40 %uint_0 OpSelectionMerge %44 None OpBranchConditional %42 %45 %46 %45 = OpLabel %47 = OpCompositeExtract %v4float %fragment 4 OpStore %color %47 OpBranch %44 %46 = OpLabel %48 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_3 %49 = OpLoad %uint %48 %51 = OpIEqual %bool %49 %uint_1 OpSelectionMerge %52 None OpBranchConditional %51 %53 %54 %53 = OpLabel %55 = OpCompositeExtract %v4float %fragment 2 OpStore %color %55 %57 = OpAccessChain %_ptr_Function_float %color %uint_3 OpStore %57 %float_1 OpBranch %52 %54 = OpLabel %59 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_3 %60 = OpLoad %uint %59 %62 = OpIEqual %bool %60 %uint_2 OpSelectionMerge %63 None OpBranchConditional %62 %64 %65 %64 = OpLabel %68 = OpAccessChain %_ptr_Uniform_v4float %uniforms %uint_4 %69 = OpLoad %v4float %68 OpStore %color %69 OpBranch %63 %65 = OpLabel %70 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_3 %71 = OpLoad %uint %70 %72 = OpIEqual %bool %71 %uint_3 OpSelectionMerge %73 None OpBranchConditional %72 %74 %73 %74 = OpLabel %76 = OpLoad %26 %mySampler %77 = OpLoad %29 %myTexture %79 = OpSampledImage %78 %77 %76 %80 = OpCompositeExtract %v2float %fragment 3 %75 = OpImageSampleImplicitLod %v4float %79 %80 OpStore %color %75 OpBranch %73 %73 = OpLabel OpBranch %63 %63 = OpLabel OpBranch %52 %52 = OpLabel OpBranch %44 %44 = OpLabel %81 = OpLoad %v4float %color OpReturnValue %81 OpFunctionEnd %main_inner = OpFunction %FragmentOutput None %82 %fragment_0 = OpFunctionParameter %FragmentInput %86 = OpLabel %output = OpVariable %_ptr_Function_FragmentOutput Function %89 %90 = OpAccessChain %_ptr_Function_v4float %output %uint_0 OpStore %90 %92 %95 = OpLoad %Uniforms %uniforms %97 = OpLoad %26 %mySampler %99 = OpLoad %29 %myTexture %101 = OpLoad %PointLights %pointLights %102 = OpLoad %FragmentOutput %output OpReturnValue %102 OpFunctionEnd %main = OpFunction %void None %103 %105 = OpLabel %107 = OpLoad %v4float %position_1 %108 = OpLoad %v4float %view_position_1 %109 = OpLoad %v4float %normal_1 %110 = OpLoad %v2float %uv_1 %111 = OpLoad %v4float %color_1 %112 = OpCompositeConstruct %FragmentInput %107 %108 %109 %110 %111 %106 = OpFunctionCall %FragmentOutput %main_inner %112 %113 = OpCompositeExtract %v4float %106 0 OpStore %color_2 %113 OpReturn OpFunctionEnd