| bug/tint/949.wgsl:326:29 warning: 'textureSample' must only be called from uniform control flow |
| let x_397 : vec4<f32> = textureSample(TextureSamplerTexture, TextureSamplerSampler, (x_394 + x_395)); |
| ^^^^^^^^^^^^^ |
| |
| bug/tint/949.wgsl:330:5 note: control flow depends on non-uniform value |
| if ((x_400 > x_401)) { |
| ^^ |
| |
| bug/tint/949.wgsl:308:27 note: reading from module-scope private variable 'v_output2' may result in a non-uniform value |
| let x_366 : vec4<f32> = v_output2; |
| ^^^^^^^^^ |
| |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 670 |
| ; Schema: 0 |
| OpCapability Shader |
| %88 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %vMainuv_param_1 %v_output1_param_1 %gl_FrontFacing_param_1 %v_uv_param_1 %v_output2_param_1 %glFragColor_1_1 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %vMainuv_param_1 "vMainuv_param_1" |
| OpName %v_output1_param_1 "v_output1_param_1" |
| OpName %gl_FrontFacing_param_1 "gl_FrontFacing_param_1" |
| OpName %v_uv_param_1 "v_uv_param_1" |
| OpName %v_output2_param_1 "v_output2_param_1" |
| OpName %glFragColor_1_1 "glFragColor_1_1" |
| OpName %u_Float "u_Float" |
| OpName %u_Color "u_Color" |
| OpName %TextureSamplerTexture "TextureSamplerTexture" |
| OpName %TextureSamplerSampler "TextureSamplerSampler" |
| OpName %vMainuv "vMainuv" |
| OpName %LeftOver "LeftOver" |
| OpMemberName %LeftOver 0 "u_World" |
| OpMemberName %LeftOver 1 "u_ViewProjection" |
| OpMemberName %LeftOver 2 "u_bumpStrength" |
| OpMemberName %LeftOver 3 "padding" |
| OpMemberName %LeftOver 4 "u_cameraPosition" |
| OpMemberName %LeftOver 5 "u_parallaxScale" |
| OpMemberName %LeftOver 6 "textureInfoName" |
| OpMemberName %LeftOver 7 "padding_1" |
| OpMemberName %LeftOver 8 "tangentSpaceParameter0" |
| OpName %x_269 "x_269" |
| OpName %v_output1 "v_output1" |
| OpName %gl_FrontFacing "gl_FrontFacing" |
| OpName %v_uv "v_uv" |
| OpName %v_output2 "v_output2" |
| OpName %TextureSampler1Texture "TextureSampler1Texture" |
| OpName %TextureSampler1Sampler "TextureSampler1Sampler" |
| OpName %Light0 "Light0" |
| OpMemberName %Light0 0 "vLightData" |
| OpMemberName %Light0 1 "vLightDiffuse" |
| OpMemberName %Light0 2 "vLightSpecular" |
| OpMemberName %Light0 3 "vLightGround" |
| OpMemberName %Light0 4 "padding_2" |
| OpMemberName %Light0 5 "shadowsInfo" |
| OpMemberName %Light0 6 "depthValues" |
| OpName %light0 "light0" |
| OpName %glFragColor "glFragColor" |
| OpName %bumpSamplerSampler "bumpSamplerSampler" |
| OpName %bumpSamplerTexture "bumpSamplerTexture" |
| OpName %cotangent_frame_vf3_vf3_vf2_vf2_ "cotangent_frame_vf3_vf3_vf2_vf2_" |
| OpName %normal_1 "normal_1" |
| OpName %p "p" |
| OpName %uv "uv" |
| OpName %tangentSpaceParams "tangentSpaceParams" |
| OpName %dp1 "dp1" |
| OpName %dp2 "dp2" |
| OpName %duv1 "duv1" |
| OpName %duv2 "duv2" |
| OpName %dp2perp "dp2perp" |
| OpName %dp1perp "dp1perp" |
| OpName %tangent "tangent" |
| OpName %bitangent "bitangent" |
| OpName %invmax "invmax" |
| OpName %transposeMat3_mf33_ "transposeMat3_mf33_" |
| OpName %inMatrix "inMatrix" |
| OpName %i0 "i0" |
| OpName %i1 "i1" |
| OpName %i2 "i2" |
| OpName %outMatrix "outMatrix" |
| OpName %perturbNormalBase_mf33_vf3_f1_ "perturbNormalBase_mf33_vf3_f1_" |
| OpName %cotangentFrame "cotangentFrame" |
| OpName %normal "normal" |
| OpName %scale "scale" |
| OpName %perturbNormal_mf33_vf3_f1_ "perturbNormal_mf33_vf3_f1_" |
| OpName %cotangentFrame_1 "cotangentFrame_1" |
| OpName %textureSample "textureSample" |
| OpName %scale_1 "scale_1" |
| OpName %param "param" |
| OpName %param_1 "param_1" |
| OpName %param_2 "param_2" |
| OpName %lightingInfo "lightingInfo" |
| OpMemberName %lightingInfo 0 "diffuse" |
| OpMemberName %lightingInfo 1 "specular" |
| OpName %computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_ "computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_" |
| OpName %viewDirectionW "viewDirectionW" |
| OpName %vNormal "vNormal" |
| OpName %lightData "lightData" |
| OpName %diffuseColor "diffuseColor" |
| OpName %specularColor "specularColor" |
| OpName %groundColor "groundColor" |
| OpName %glossiness "glossiness" |
| OpName %ndl "ndl" |
| OpName %result "result" |
| OpName %angleW "angleW" |
| OpName %specComp "specComp" |
| OpName %main_1 "main_1" |
| OpName %tempTextureRead "tempTextureRead" |
| OpName %rgb "rgb" |
| OpName %output5 "output5" |
| OpName %output4 "output4" |
| OpName %uvOffset "uvOffset" |
| OpName %normalScale "normalScale" |
| OpName %TBNUV "TBNUV" |
| OpName %x_299 "x_299" |
| OpName %TBN "TBN" |
| OpName %param_3 "param_3" |
| OpName %param_4 "param_4" |
| OpName %param_5 "param_5" |
| OpName %param_6 "param_6" |
| OpName %invTBN "invTBN" |
| OpName %param_7 "param_7" |
| OpName %parallaxLimit "parallaxLimit" |
| OpName %vOffsetDir "vOffsetDir" |
| OpName %vMaxOffset "vMaxOffset" |
| OpName %numSamples "numSamples" |
| OpName %stepSize "stepSize" |
| OpName %currRayHeight "currRayHeight" |
| OpName %vCurrOffset "vCurrOffset" |
| OpName %vLastOffset "vLastOffset" |
| OpName %lastSampledHeight "lastSampledHeight" |
| OpName %currSampledHeight "currSampledHeight" |
| OpName %i "i" |
| OpName %delta1 "delta1" |
| OpName %delta2 "delta2" |
| OpName %ratio "ratio" |
| OpName %parallaxOcclusion_0 "parallaxOcclusion_0" |
| OpName %param_8 "param_8" |
| OpName %param_9 "param_9" |
| OpName %param_10 "param_10" |
| OpName %output6 "output6" |
| OpName %tempTextureRead1 "tempTextureRead1" |
| OpName %rgb1 "rgb1" |
| OpName %viewDirectionW_1 "viewDirectionW_1" |
| OpName %shadow "shadow" |
| OpName %glossiness_1 "glossiness_1" |
| OpName %diffuseBase "diffuseBase" |
| OpName %specularBase "specularBase" |
| OpName %normalW "normalW" |
| OpName %info "info" |
| OpName %param_11 "param_11" |
| OpName %param_12 "param_12" |
| OpName %param_13 "param_13" |
| OpName %param_14 "param_14" |
| OpName %param_15 "param_15" |
| OpName %param_16 "param_16" |
| OpName %param_17 "param_17" |
| OpName %diffuseOutput "diffuseOutput" |
| OpName %specularOutput "specularOutput" |
| OpName %output3 "output3" |
| OpName %main_out "main_out" |
| OpMemberName %main_out 0 "glFragColor_1" |
| OpName %main_inner "main_inner" |
| OpName %vMainuv_param "vMainuv_param" |
| OpName %v_output1_param "v_output1_param" |
| OpName %gl_FrontFacing_param "gl_FrontFacing_param" |
| OpName %v_uv_param "v_uv_param" |
| OpName %v_output2_param "v_output2_param" |
| OpName %main "main" |
| OpDecorate %vMainuv_param_1 Location 1 |
| OpDecorate %v_output1_param_1 Location 0 |
| OpDecorate %gl_FrontFacing_param_1 BuiltIn FrontFacing |
| OpDecorate %v_uv_param_1 Location 3 |
| OpDecorate %v_output2_param_1 Location 2 |
| OpDecorate %glFragColor_1_1 Location 0 |
| OpDecorate %TextureSamplerTexture DescriptorSet 2 |
| OpDecorate %TextureSamplerTexture Binding 1 |
| OpDecorate %TextureSamplerSampler DescriptorSet 2 |
| OpDecorate %TextureSamplerSampler Binding 0 |
| OpDecorate %LeftOver Block |
| OpMemberDecorate %LeftOver 0 Offset 0 |
| OpMemberDecorate %LeftOver 0 ColMajor |
| OpMemberDecorate %LeftOver 0 MatrixStride 16 |
| OpMemberDecorate %LeftOver 1 Offset 64 |
| OpMemberDecorate %LeftOver 1 ColMajor |
| OpMemberDecorate %LeftOver 1 MatrixStride 16 |
| OpMemberDecorate %LeftOver 2 Offset 128 |
| OpMemberDecorate %LeftOver 3 Offset 132 |
| OpMemberDecorate %LeftOver 4 Offset 144 |
| OpMemberDecorate %LeftOver 5 Offset 156 |
| OpMemberDecorate %LeftOver 6 Offset 160 |
| OpMemberDecorate %LeftOver 7 Offset 164 |
| OpMemberDecorate %LeftOver 8 Offset 168 |
| OpDecorate %x_269 NonWritable |
| OpDecorate %x_269 DescriptorSet 2 |
| OpDecorate %x_269 Binding 6 |
| OpDecorate %TextureSampler1Texture DescriptorSet 2 |
| OpDecorate %TextureSampler1Texture Binding 3 |
| OpDecorate %TextureSampler1Sampler DescriptorSet 2 |
| OpDecorate %TextureSampler1Sampler Binding 2 |
| OpDecorate %Light0 Block |
| OpMemberDecorate %Light0 0 Offset 0 |
| OpMemberDecorate %Light0 1 Offset 16 |
| OpMemberDecorate %Light0 2 Offset 32 |
| OpMemberDecorate %Light0 3 Offset 48 |
| OpMemberDecorate %Light0 4 Offset 60 |
| OpMemberDecorate %Light0 5 Offset 64 |
| OpMemberDecorate %Light0 6 Offset 80 |
| OpDecorate %light0 NonWritable |
| OpDecorate %light0 DescriptorSet 0 |
| OpDecorate %light0 Binding 5 |
| OpDecorate %bumpSamplerSampler DescriptorSet 2 |
| OpDecorate %bumpSamplerSampler Binding 4 |
| OpDecorate %bumpSamplerTexture DescriptorSet 2 |
| OpDecorate %bumpSamplerTexture Binding 5 |
| OpMemberDecorate %lightingInfo 0 Offset 0 |
| OpMemberDecorate %lightingInfo 1 Offset 16 |
| OpMemberDecorate %main_out 0 Offset 0 |
| %float = OpTypeFloat 32 |
| %v2float = OpTypeVector %float 2 |
| %_ptr_Input_v2float = OpTypePointer Input %v2float |
| %vMainuv_param_1 = OpVariable %_ptr_Input_v2float Input |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Input_v4float = OpTypePointer Input %v4float |
| %v_output1_param_1 = OpVariable %_ptr_Input_v4float Input |
| %bool = OpTypeBool |
| %_ptr_Input_bool = OpTypePointer Input %bool |
| %gl_FrontFacing_param_1 = OpVariable %_ptr_Input_bool Input |
| %v_uv_param_1 = OpVariable %_ptr_Input_v2float Input |
| %v_output2_param_1 = OpVariable %_ptr_Input_v4float Input |
| %_ptr_Output_v4float = OpTypePointer Output %v4float |
| %15 = OpConstantNull %v4float |
| %glFragColor_1_1 = OpVariable %_ptr_Output_v4float Output %15 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %18 = OpConstantNull %float |
| %u_Float = OpVariable %_ptr_Private_float Private %18 |
| %v3float = OpTypeVector %float 3 |
| %_ptr_Private_v3float = OpTypePointer Private %v3float |
| %22 = OpConstantNull %v3float |
| %u_Color = OpVariable %_ptr_Private_v3float Private %22 |
| %25 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25 |
| %TextureSamplerTexture = OpVariable %_ptr_UniformConstant_25 UniformConstant |
| %28 = OpTypeSampler |
| %_ptr_UniformConstant_28 = OpTypePointer UniformConstant %28 |
| %TextureSamplerSampler = OpVariable %_ptr_UniformConstant_28 UniformConstant |
| %_ptr_Private_v2float = OpTypePointer Private %v2float |
| %31 = OpConstantNull %v2float |
| %vMainuv = OpVariable %_ptr_Private_v2float Private %31 |
| %mat4v4float = OpTypeMatrix %v4float 4 |
| %uint = OpTypeInt 32 0 |
| %LeftOver = OpTypeStruct %mat4v4float %mat4v4float %float %uint %v3float %float %float %uint %v2float |
| %_ptr_Uniform_LeftOver = OpTypePointer Uniform %LeftOver |
| %x_269 = OpVariable %_ptr_Uniform_LeftOver Uniform |
| %_ptr_Private_v4float = OpTypePointer Private %v4float |
| %v_output1 = OpVariable %_ptr_Private_v4float Private %15 |
| %_ptr_Private_bool = OpTypePointer Private %bool |
| %41 = OpConstantNull %bool |
| %gl_FrontFacing = OpVariable %_ptr_Private_bool Private %41 |
| %v_uv = OpVariable %_ptr_Private_v2float Private %31 |
| %v_output2 = OpVariable %_ptr_Private_v4float Private %15 |
| %TextureSampler1Texture = OpVariable %_ptr_UniformConstant_25 UniformConstant |
| %TextureSampler1Sampler = OpVariable %_ptr_UniformConstant_28 UniformConstant |
| %Light0 = OpTypeStruct %v4float %v4float %v4float %v3float %uint %v4float %v2float |
| %_ptr_Uniform_Light0 = OpTypePointer Uniform %Light0 |
| %light0 = OpVariable %_ptr_Uniform_Light0 Uniform |
| %glFragColor = OpVariable %_ptr_Private_v4float Private %15 |
| %bumpSamplerSampler = OpVariable %_ptr_UniformConstant_28 UniformConstant |
| %bumpSamplerTexture = OpVariable %_ptr_UniformConstant_25 UniformConstant |
| %mat3v3float = OpTypeMatrix %v3float 3 |
| %_ptr_Function_v3float = OpTypePointer Function %v3float |
| %_ptr_Function_v2float = OpTypePointer Function %v2float |
| %52 = OpTypeFunction %mat3v3float %_ptr_Function_v3float %_ptr_Function_v3float %_ptr_Function_v2float %_ptr_Function_v2float |
| %_ptr_Function_float = OpTypePointer Function %float |
| %uint_0 = OpConstant %uint 0 |
| %uint_1 = OpConstant %uint 1 |
| %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float |
| %152 = OpTypeFunction %mat3v3float %_ptr_Function_mat3v3float |
| %161 = OpConstantNull %mat3v3float |
| %int = OpTypeInt 32 1 |
| %164 = OpConstantNull %int |
| %int_1 = OpConstant %int 1 |
| %int_2 = OpConstant %int 2 |
| %uint_2 = OpConstant %uint 2 |
| %211 = OpTypeFunction %v3float %_ptr_Function_mat3v3float %_ptr_Function_v3float %_ptr_Function_float |
| %float_2 = OpConstant %float 2 |
| %float_1 = OpConstant %float 1 |
| %238 = OpConstantComposite %v3float %float_1 %float_1 %float_1 |
| %lightingInfo = OpTypeStruct %v3float %v3float |
| %_ptr_Function_v4float = OpTypePointer Function %v4float |
| %246 = OpTypeFunction %lightingInfo %_ptr_Function_v3float %_ptr_Function_v3float %_ptr_Function_v4float %_ptr_Function_v3float %_ptr_Function_v3float %_ptr_Function_v3float %_ptr_Function_float |
| %_ptr_Function_lightingInfo = OpTypePointer Function %lightingInfo |
| %261 = OpConstantNull %lightingInfo |
| %float_0_5 = OpConstant %float 0.5 |
| %void = OpTypeVoid |
| %310 = OpTypeFunction %void |
| %_ptr_Function_int = OpTypePointer Function %int |
| %float_100 = OpConstant %float 100 |
| %369 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 |
| %374 = OpTypeSampledImage %25 |
| %uint_6 = OpConstant %uint 6 |
| %_ptr_Uniform_float = OpTypePointer Uniform %float |
| %uint_4 = OpConstant %uint 4 |
| %_ptr_Uniform_v3float = OpTypePointer Uniform %v3float |
| %uint_8 = OpConstant %uint 8 |
| %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float |
| %uint_5 = OpConstant %uint 5 |
| %float_15 = OpConstant %float 15 |
| %float_n11 = OpConstant %float -11 |
| %int_15 = OpConstant %int 15 |
| %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float |
| %uint_3 = OpConstant %uint 3 |
| %main_out = OpTypeStruct %v4float |
| %649 = OpTypeFunction %main_out %v2float %v4float %bool %v2float %v4float |
| %cotangent_frame_vf3_vf3_vf2_vf2_ = OpFunction %mat3v3float None %52 |
| %normal_1 = OpFunctionParameter %_ptr_Function_v3float |
| %p = OpFunctionParameter %_ptr_Function_v3float |
| %uv = OpFunctionParameter %_ptr_Function_v2float |
| %tangentSpaceParams = OpFunctionParameter %_ptr_Function_v2float |
| %61 = OpLabel |
| %dp1 = OpVariable %_ptr_Function_v3float Function %22 |
| %dp2 = OpVariable %_ptr_Function_v3float Function %22 |
| %duv1 = OpVariable %_ptr_Function_v2float Function %31 |
| %duv2 = OpVariable %_ptr_Function_v2float Function %31 |
| %dp2perp = OpVariable %_ptr_Function_v3float Function %22 |
| %dp1perp = OpVariable %_ptr_Function_v3float Function %22 |
| %tangent = OpVariable %_ptr_Function_v3float Function %22 |
| %bitangent = OpVariable %_ptr_Function_v3float Function %22 |
| %invmax = OpVariable %_ptr_Function_float Function %18 |
| %73 = OpLoad %v3float %p |
| %74 = OpDPdx %v3float %73 |
| OpStore %dp1 %74 |
| %76 = OpLoad %v3float %p |
| %77 = OpDPdy %v3float %76 |
| OpStore %dp2 %77 |
| %79 = OpLoad %v2float %uv |
| %80 = OpDPdx %v2float %79 |
| OpStore %duv1 %80 |
| %82 = OpLoad %v2float %uv |
| %83 = OpDPdy %v2float %82 |
| OpStore %duv2 %83 |
| %84 = OpLoad %v3float %dp2 |
| %86 = OpLoad %v3float %normal_1 |
| %87 = OpExtInst %v3float %88 Cross %84 %86 |
| OpStore %dp2perp %87 |
| %90 = OpLoad %v3float %normal_1 |
| %91 = OpLoad %v3float %dp1 |
| %92 = OpExtInst %v3float %88 Cross %90 %91 |
| OpStore %dp1perp %92 |
| %93 = OpLoad %v3float %dp2perp |
| %95 = OpAccessChain %_ptr_Function_float %duv1 %uint_0 |
| %96 = OpLoad %float %95 |
| %97 = OpLoad %v3float %dp1perp |
| %98 = OpAccessChain %_ptr_Function_float %duv2 %uint_0 |
| %99 = OpLoad %float %98 |
| %100 = OpVectorTimesScalar %v3float %93 %96 |
| %101 = OpVectorTimesScalar %v3float %97 %99 |
| %102 = OpFAdd %v3float %100 %101 |
| OpStore %tangent %102 |
| %103 = OpLoad %v3float %dp2perp |
| %105 = OpAccessChain %_ptr_Function_float %duv1 %uint_1 |
| %106 = OpLoad %float %105 |
| %107 = OpLoad %v3float %dp1perp |
| %108 = OpAccessChain %_ptr_Function_float %duv2 %uint_1 |
| %109 = OpLoad %float %108 |
| %110 = OpVectorTimesScalar %v3float %103 %106 |
| %111 = OpVectorTimesScalar %v3float %107 %109 |
| %112 = OpFAdd %v3float %110 %111 |
| OpStore %bitangent %112 |
| %114 = OpAccessChain %_ptr_Function_float %tangentSpaceParams %uint_0 |
| %115 = OpLoad %float %114 |
| %116 = OpLoad %v3float %tangent |
| %117 = OpVectorTimesScalar %v3float %116 %115 |
| OpStore %tangent %117 |
| %119 = OpAccessChain %_ptr_Function_float %tangentSpaceParams %uint_1 |
| %120 = OpLoad %float %119 |
| %121 = OpLoad %v3float %bitangent |
| %122 = OpVectorTimesScalar %v3float %121 %120 |
| OpStore %bitangent %122 |
| %123 = OpLoad %v3float %tangent |
| %124 = OpLoad %v3float %tangent |
| %125 = OpLoad %v3float %bitangent |
| %126 = OpLoad %v3float %bitangent |
| %129 = OpDot %float %123 %124 |
| %130 = OpDot %float %125 %126 |
| %128 = OpExtInst %float %88 NMax %129 %130 |
| %127 = OpExtInst %float %88 InverseSqrt %128 |
| OpStore %invmax %127 |
| %131 = OpLoad %v3float %tangent |
| %132 = OpLoad %float %invmax |
| %133 = OpVectorTimesScalar %v3float %131 %132 |
| %134 = OpLoad %v3float %bitangent |
| %135 = OpLoad %float %invmax |
| %136 = OpVectorTimesScalar %v3float %134 %135 |
| %138 = OpLoad %v3float %normal_1 |
| %139 = OpCompositeExtract %float %133 0 |
| %140 = OpCompositeExtract %float %133 1 |
| %141 = OpCompositeExtract %float %133 2 |
| %142 = OpCompositeConstruct %v3float %139 %140 %141 |
| %143 = OpCompositeExtract %float %136 0 |
| %144 = OpCompositeExtract %float %136 1 |
| %145 = OpCompositeExtract %float %136 2 |
| %146 = OpCompositeConstruct %v3float %143 %144 %145 |
| %147 = OpCompositeExtract %float %138 0 |
| %148 = OpCompositeExtract %float %138 1 |
| %149 = OpCompositeExtract %float %138 2 |
| %150 = OpCompositeConstruct %v3float %147 %148 %149 |
| %151 = OpCompositeConstruct %mat3v3float %142 %146 %150 |
| OpReturnValue %151 |
| OpFunctionEnd |
| %transposeMat3_mf33_ = OpFunction %mat3v3float None %152 |
| %inMatrix = OpFunctionParameter %_ptr_Function_mat3v3float |
| %156 = OpLabel |
| %i0 = OpVariable %_ptr_Function_v3float Function %22 |
| %i1 = OpVariable %_ptr_Function_v3float Function %22 |
| %i2 = OpVariable %_ptr_Function_v3float Function %22 |
| %outMatrix = OpVariable %_ptr_Function_mat3v3float Function %161 |
| %165 = OpAccessChain %_ptr_Function_v3float %inMatrix %164 |
| %166 = OpLoad %v3float %165 |
| OpStore %i0 %166 |
| %169 = OpAccessChain %_ptr_Function_v3float %inMatrix %int_1 |
| %170 = OpLoad %v3float %169 |
| OpStore %i1 %170 |
| %173 = OpAccessChain %_ptr_Function_v3float %inMatrix %int_2 |
| %174 = OpLoad %v3float %173 |
| OpStore %i2 %174 |
| %175 = OpAccessChain %_ptr_Function_float %i0 %uint_0 |
| %176 = OpLoad %float %175 |
| %177 = OpAccessChain %_ptr_Function_float %i1 %uint_0 |
| %178 = OpLoad %float %177 |
| %179 = OpAccessChain %_ptr_Function_float %i2 %uint_0 |
| %180 = OpLoad %float %179 |
| %181 = OpCompositeConstruct %v3float %176 %178 %180 |
| %182 = OpAccessChain %_ptr_Function_float %i0 %uint_1 |
| %183 = OpLoad %float %182 |
| %184 = OpAccessChain %_ptr_Function_float %i1 %uint_1 |
| %185 = OpLoad %float %184 |
| %186 = OpAccessChain %_ptr_Function_float %i2 %uint_1 |
| %187 = OpLoad %float %186 |
| %188 = OpCompositeConstruct %v3float %183 %185 %187 |
| %190 = OpAccessChain %_ptr_Function_float %i0 %uint_2 |
| %191 = OpLoad %float %190 |
| %192 = OpAccessChain %_ptr_Function_float %i1 %uint_2 |
| %193 = OpLoad %float %192 |
| %194 = OpAccessChain %_ptr_Function_float %i2 %uint_2 |
| %195 = OpLoad %float %194 |
| %196 = OpCompositeConstruct %v3float %191 %193 %195 |
| %197 = OpCompositeExtract %float %181 0 |
| %198 = OpCompositeExtract %float %181 1 |
| %199 = OpCompositeExtract %float %181 2 |
| %200 = OpCompositeConstruct %v3float %197 %198 %199 |
| %201 = OpCompositeExtract %float %188 0 |
| %202 = OpCompositeExtract %float %188 1 |
| %203 = OpCompositeExtract %float %188 2 |
| %204 = OpCompositeConstruct %v3float %201 %202 %203 |
| %205 = OpCompositeExtract %float %196 0 |
| %206 = OpCompositeExtract %float %196 1 |
| %207 = OpCompositeExtract %float %196 2 |
| %208 = OpCompositeConstruct %v3float %205 %206 %207 |
| %209 = OpCompositeConstruct %mat3v3float %200 %204 %208 |
| OpStore %outMatrix %209 |
| %210 = OpLoad %mat3v3float %outMatrix |
| OpReturnValue %210 |
| OpFunctionEnd |
| %perturbNormalBase_mf33_vf3_f1_ = OpFunction %v3float None %211 |
| %cotangentFrame = OpFunctionParameter %_ptr_Function_mat3v3float |
| %normal = OpFunctionParameter %_ptr_Function_v3float |
| %scale = OpFunctionParameter %_ptr_Function_float |
| %216 = OpLabel |
| %218 = OpLoad %mat3v3float %cotangentFrame |
| %220 = OpLoad %v3float %normal |
| %222 = OpMatrixTimesVector %v3float %218 %220 |
| %221 = OpExtInst %v3float %88 Normalize %222 |
| OpReturnValue %221 |
| OpFunctionEnd |
| %perturbNormal_mf33_vf3_f1_ = OpFunction %v3float None %211 |
| %cotangentFrame_1 = OpFunctionParameter %_ptr_Function_mat3v3float |
| %textureSample = OpFunctionParameter %_ptr_Function_v3float |
| %scale_1 = OpFunctionParameter %_ptr_Function_float |
| %227 = OpLabel |
| %param = OpVariable %_ptr_Function_mat3v3float Function %161 |
| %param_1 = OpVariable %_ptr_Function_v3float Function %22 |
| %param_2 = OpVariable %_ptr_Function_float Function %18 |
| %232 = OpLoad %v3float %textureSample |
| %234 = OpLoad %mat3v3float %cotangentFrame_1 |
| OpStore %param %234 |
| %236 = OpVectorTimesScalar %v3float %232 %float_2 |
| %239 = OpFSub %v3float %236 %238 |
| OpStore %param_1 %239 |
| %241 = OpLoad %float %scale_1 |
| OpStore %param_2 %241 |
| %242 = OpFunctionCall %v3float %perturbNormalBase_mf33_vf3_f1_ %param %param_1 %param_2 |
| OpReturnValue %242 |
| OpFunctionEnd |
| %computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_ = OpFunction %lightingInfo None %246 |
| %viewDirectionW = OpFunctionParameter %_ptr_Function_v3float |
| %vNormal = OpFunctionParameter %_ptr_Function_v3float |
| %lightData = OpFunctionParameter %_ptr_Function_v4float |
| %diffuseColor = OpFunctionParameter %_ptr_Function_v3float |
| %specularColor = OpFunctionParameter %_ptr_Function_v3float |
| %groundColor = OpFunctionParameter %_ptr_Function_v3float |
| %glossiness = OpFunctionParameter %_ptr_Function_float |
| %257 = OpLabel |
| %ndl = OpVariable %_ptr_Function_float Function %18 |
| %result = OpVariable %_ptr_Function_lightingInfo Function %261 |
| %angleW = OpVariable %_ptr_Function_v3float Function %22 |
| %specComp = OpVariable %_ptr_Function_float Function %18 |
| %265 = OpLoad %v3float %vNormal |
| %267 = OpLoad %v4float %lightData |
| %269 = OpCompositeExtract %float %267 0 |
| %270 = OpCompositeExtract %float %267 1 |
| %271 = OpCompositeExtract %float %267 2 |
| %272 = OpCompositeConstruct %v3float %269 %270 %271 |
| %268 = OpDot %float %265 %272 |
| %274 = OpFMul %float %268 %float_0_5 |
| %275 = OpFAdd %float %274 %float_0_5 |
| OpStore %ndl %275 |
| %277 = OpLoad %v3float %groundColor |
| %279 = OpLoad %v3float %diffuseColor |
| %280 = OpLoad %float %ndl |
| %281 = OpAccessChain %_ptr_Function_v3float %result %uint_0 |
| %283 = OpCompositeConstruct %v3float %280 %280 %280 |
| %282 = OpExtInst %v3float %88 FMix %277 %279 %283 |
| OpStore %281 %282 |
| %285 = OpLoad %v3float %viewDirectionW |
| %287 = OpLoad %v4float %lightData |
| %289 = OpCompositeExtract %float %287 0 |
| %290 = OpCompositeExtract %float %287 1 |
| %291 = OpCompositeExtract %float %287 2 |
| %292 = OpCompositeConstruct %v3float %289 %290 %291 |
| %293 = OpFAdd %v3float %285 %292 |
| %288 = OpExtInst %v3float %88 Normalize %293 |
| OpStore %angleW %288 |
| %295 = OpLoad %v3float %vNormal |
| %296 = OpLoad %v3float %angleW |
| %298 = OpDot %float %295 %296 |
| %297 = OpExtInst %float %88 NMax %18 %298 |
| OpStore %specComp %297 |
| %299 = OpLoad %float %specComp |
| %301 = OpLoad %float %glossiness |
| %303 = OpExtInst %float %88 NMax %float_1 %301 |
| %302 = OpExtInst %float %88 Pow %299 %303 |
| OpStore %specComp %302 |
| %304 = OpLoad %float %specComp |
| %306 = OpLoad %v3float %specularColor |
| %307 = OpAccessChain %_ptr_Function_v3float %result %uint_1 |
| %308 = OpVectorTimesScalar %v3float %306 %304 |
| OpStore %307 %308 |
| %309 = OpLoad %lightingInfo %result |
| OpReturnValue %309 |
| OpFunctionEnd |
| %main_1 = OpFunction %void None %310 |
| %313 = OpLabel |
| %tempTextureRead = OpVariable %_ptr_Function_v4float Function %15 |
| %rgb = OpVariable %_ptr_Function_v3float Function %22 |
| %output5 = OpVariable %_ptr_Function_v3float Function %22 |
| %output4 = OpVariable %_ptr_Function_v4float Function %15 |
| %uvOffset = OpVariable %_ptr_Function_v2float Function %31 |
| %normalScale = OpVariable %_ptr_Function_float Function %18 |
| %TBNUV = OpVariable %_ptr_Function_v2float Function %31 |
| %x_299 = OpVariable %_ptr_Function_v2float Function %31 |
| %TBN = OpVariable %_ptr_Function_mat3v3float Function %161 |
| %param_3 = OpVariable %_ptr_Function_v3float Function %22 |
| %param_4 = OpVariable %_ptr_Function_v3float Function %22 |
| %param_5 = OpVariable %_ptr_Function_v2float Function %31 |
| %param_6 = OpVariable %_ptr_Function_v2float Function %31 |
| %invTBN = OpVariable %_ptr_Function_mat3v3float Function %161 |
| %param_7 = OpVariable %_ptr_Function_mat3v3float Function %161 |
| %parallaxLimit = OpVariable %_ptr_Function_float Function %18 |
| %vOffsetDir = OpVariable %_ptr_Function_v2float Function %31 |
| %vMaxOffset = OpVariable %_ptr_Function_v2float Function %31 |
| %numSamples = OpVariable %_ptr_Function_float Function %18 |
| %stepSize = OpVariable %_ptr_Function_float Function %18 |
| %currRayHeight = OpVariable %_ptr_Function_float Function %18 |
| %vCurrOffset = OpVariable %_ptr_Function_v2float Function %31 |
| %vLastOffset = OpVariable %_ptr_Function_v2float Function %31 |
| %lastSampledHeight = OpVariable %_ptr_Function_float Function %18 |
| %currSampledHeight = OpVariable %_ptr_Function_float Function %18 |
| %i = OpVariable %_ptr_Function_int Function %164 |
| %delta1 = OpVariable %_ptr_Function_float Function %18 |
| %delta2 = OpVariable %_ptr_Function_float Function %18 |
| %ratio = OpVariable %_ptr_Function_float Function %18 |
| %parallaxOcclusion_0 = OpVariable %_ptr_Function_v2float Function %31 |
| %param_8 = OpVariable %_ptr_Function_mat3v3float Function %161 |
| %param_9 = OpVariable %_ptr_Function_v3float Function %22 |
| %param_10 = OpVariable %_ptr_Function_float Function %18 |
| %output6 = OpVariable %_ptr_Function_v2float Function %31 |
| %tempTextureRead1 = OpVariable %_ptr_Function_v4float Function %15 |
| %rgb1 = OpVariable %_ptr_Function_v3float Function %22 |
| %viewDirectionW_1 = OpVariable %_ptr_Function_v3float Function %22 |
| %shadow = OpVariable %_ptr_Function_float Function %18 |
| %glossiness_1 = OpVariable %_ptr_Function_float Function %18 |
| %diffuseBase = OpVariable %_ptr_Function_v3float Function %22 |
| %specularBase = OpVariable %_ptr_Function_v3float Function %22 |
| %normalW = OpVariable %_ptr_Function_v3float Function %22 |
| %info = OpVariable %_ptr_Function_lightingInfo Function %261 |
| %param_11 = OpVariable %_ptr_Function_v3float Function %22 |
| %param_12 = OpVariable %_ptr_Function_v3float Function %22 |
| %param_13 = OpVariable %_ptr_Function_v4float Function %15 |
| %param_14 = OpVariable %_ptr_Function_v3float Function %22 |
| %param_15 = OpVariable %_ptr_Function_v3float Function %22 |
| %param_16 = OpVariable %_ptr_Function_v3float Function %22 |
| %param_17 = OpVariable %_ptr_Function_float Function %18 |
| %diffuseOutput = OpVariable %_ptr_Function_v3float Function %22 |
| %specularOutput = OpVariable %_ptr_Function_v3float Function %22 |
| %output3 = OpVariable %_ptr_Function_v3float Function %22 |
| OpStore %u_Float %float_100 |
| OpStore %u_Color %369 |
| %370 = OpLoad %v2float %vMainuv |
| %372 = OpLoad %28 %TextureSamplerSampler |
| %373 = OpLoad %25 %TextureSamplerTexture |
| %375 = OpSampledImage %374 %373 %372 |
| %371 = OpImageSampleImplicitLod %v4float %375 %370 |
| OpStore %tempTextureRead %371 |
| %376 = OpLoad %v4float %tempTextureRead |
| %379 = OpAccessChain %_ptr_Uniform_float %x_269 %uint_6 |
| %380 = OpLoad %float %379 |
| %381 = OpCompositeExtract %float %376 0 |
| %382 = OpCompositeExtract %float %376 1 |
| %383 = OpCompositeExtract %float %376 2 |
| %384 = OpCompositeConstruct %v3float %381 %382 %383 |
| %385 = OpVectorTimesScalar %v3float %384 %380 |
| OpStore %rgb %385 |
| %388 = OpAccessChain %_ptr_Uniform_v3float %x_269 %uint_4 |
| %389 = OpLoad %v3float %388 |
| %390 = OpLoad %v4float %v_output1 |
| %392 = OpCompositeExtract %float %390 0 |
| %393 = OpCompositeExtract %float %390 1 |
| %394 = OpCompositeExtract %float %390 2 |
| %395 = OpCompositeConstruct %v3float %392 %393 %394 |
| %396 = OpFSub %v3float %389 %395 |
| %391 = OpExtInst %v3float %88 Normalize %396 |
| OpStore %output5 %391 |
| OpStore %output4 %15 |
| OpStore %uvOffset %31 |
| %397 = OpAccessChain %_ptr_Uniform_float %x_269 %uint_2 |
| %398 = OpLoad %float %397 |
| %399 = OpFDiv %float %float_1 %398 |
| OpStore %normalScale %399 |
| %400 = OpLoad %bool %gl_FrontFacing |
| OpSelectionMerge %401 None |
| OpBranchConditional %400 %402 %403 |
| %402 = OpLabel |
| %404 = OpLoad %v2float %v_uv |
| OpStore %x_299 %404 |
| OpBranch %401 |
| %403 = OpLabel |
| %405 = OpLoad %v2float %v_uv |
| %406 = OpFNegate %v2float %405 |
| OpStore %x_299 %406 |
| OpBranch %401 |
| %401 = OpLabel |
| %407 = OpLoad %v2float %x_299 |
| OpStore %TBNUV %407 |
| %408 = OpLoad %v4float %v_output2 |
| %409 = OpLoad %float %normalScale |
| %410 = OpCompositeExtract %float %408 0 |
| %411 = OpCompositeExtract %float %408 1 |
| %412 = OpCompositeExtract %float %408 2 |
| %413 = OpCompositeConstruct %v3float %410 %411 %412 |
| %414 = OpVectorTimesScalar %v3float %413 %409 |
| OpStore %param_3 %414 |
| %415 = OpLoad %v4float %v_output1 |
| %416 = OpCompositeExtract %float %415 0 |
| %417 = OpCompositeExtract %float %415 1 |
| %418 = OpCompositeExtract %float %415 2 |
| %419 = OpCompositeConstruct %v3float %416 %417 %418 |
| OpStore %param_4 %419 |
| %420 = OpLoad %v2float %TBNUV |
| OpStore %param_5 %420 |
| %423 = OpAccessChain %_ptr_Uniform_v2float %x_269 %uint_8 |
| %424 = OpLoad %v2float %423 |
| OpStore %param_6 %424 |
| %425 = OpFunctionCall %mat3v3float %cotangent_frame_vf3_vf3_vf2_vf2_ %param_3 %param_4 %param_5 %param_6 |
| OpStore %TBN %425 |
| %430 = OpLoad %mat3v3float %TBN |
| OpStore %param_7 %430 |
| %431 = OpFunctionCall %mat3v3float %transposeMat3_mf33_ %param_7 |
| OpStore %invTBN %431 |
| %433 = OpLoad %mat3v3float %invTBN |
| %434 = OpLoad %v3float %output5 |
| %435 = OpFNegate %v3float %434 |
| %436 = OpMatrixTimesVector %v3float %433 %435 |
| %437 = OpLoad %mat3v3float %invTBN |
| %438 = OpLoad %v3float %output5 |
| %440 = OpCompositeExtract %float %436 0 |
| %441 = OpCompositeExtract %float %436 1 |
| %442 = OpCompositeConstruct %v2float %440 %441 |
| %439 = OpExtInst %float %88 Length %442 |
| %443 = OpFNegate %v3float %438 |
| %444 = OpMatrixTimesVector %v3float %437 %443 |
| %445 = OpCompositeExtract %float %444 2 |
| %446 = OpFDiv %float %439 %445 |
| OpStore %parallaxLimit %446 |
| %448 = OpAccessChain %_ptr_Uniform_float %x_269 %uint_5 |
| %449 = OpLoad %float %448 |
| %450 = OpLoad %float %parallaxLimit |
| %451 = OpFMul %float %450 %449 |
| OpStore %parallaxLimit %451 |
| %452 = OpLoad %mat3v3float %invTBN |
| %453 = OpLoad %v3float %output5 |
| %454 = OpFNegate %v3float %453 |
| %455 = OpMatrixTimesVector %v3float %452 %454 |
| %457 = OpCompositeExtract %float %455 0 |
| %458 = OpCompositeExtract %float %455 1 |
| %459 = OpCompositeConstruct %v2float %457 %458 |
| %456 = OpExtInst %v2float %88 Normalize %459 |
| OpStore %vOffsetDir %456 |
| %460 = OpLoad %v2float %vOffsetDir |
| %461 = OpLoad %float %parallaxLimit |
| %462 = OpVectorTimesScalar %v2float %460 %461 |
| OpStore %vMaxOffset %462 |
| %463 = OpLoad %mat3v3float %invTBN |
| %464 = OpLoad %v3float %output5 |
| %465 = OpLoad %mat3v3float %invTBN |
| %466 = OpLoad %v4float %v_output2 |
| %469 = OpFNegate %v3float %464 |
| %470 = OpMatrixTimesVector %v3float %463 %469 |
| %471 = OpCompositeExtract %float %466 0 |
| %472 = OpCompositeExtract %float %466 1 |
| %473 = OpCompositeExtract %float %466 2 |
| %474 = OpCompositeConstruct %v3float %471 %472 %473 |
| %475 = OpMatrixTimesVector %v3float %465 %474 |
| %468 = OpDot %float %470 %475 |
| %477 = OpFMul %float %468 %float_n11 |
| %478 = OpFAdd %float %float_15 %477 |
| OpStore %numSamples %478 |
| %479 = OpLoad %float %numSamples |
| %480 = OpFDiv %float %float_1 %479 |
| OpStore %stepSize %480 |
| OpStore %currRayHeight %float_1 |
| OpStore %vCurrOffset %31 |
| OpStore %vLastOffset %31 |
| OpStore %lastSampledHeight %float_1 |
| OpStore %currSampledHeight %float_1 |
| OpStore %i %164 |
| OpBranch %481 |
| %481 = OpLabel |
| OpLoopMerge %482 %483 None |
| OpBranch %484 |
| %484 = OpLabel |
| %485 = OpLoad %int %i |
| %487 = OpSLessThan %bool %485 %int_15 |
| OpSelectionMerge %488 None |
| OpBranchConditional %487 %489 %490 |
| %489 = OpLabel |
| OpBranch %488 |
| %490 = OpLabel |
| OpBranch %482 |
| %488 = OpLabel |
| %491 = OpLoad %v2float %v_uv |
| %492 = OpLoad %v2float %vCurrOffset |
| %494 = OpLoad %28 %TextureSamplerSampler |
| %495 = OpLoad %25 %TextureSamplerTexture |
| %496 = OpSampledImage %374 %495 %494 |
| %497 = OpFAdd %v2float %491 %492 |
| %493 = OpImageSampleImplicitLod %v4float %496 %497 |
| %498 = OpCompositeExtract %float %493 3 |
| OpStore %currSampledHeight %498 |
| %499 = OpLoad %float %currSampledHeight |
| %500 = OpLoad %float %currRayHeight |
| %501 = OpFOrdGreaterThan %bool %499 %500 |
| OpSelectionMerge %502 None |
| OpBranchConditional %501 %503 %504 |
| %503 = OpLabel |
| %505 = OpLoad %float %currSampledHeight |
| %506 = OpLoad %float %currRayHeight |
| %507 = OpFSub %float %505 %506 |
| OpStore %delta1 %507 |
| %508 = OpLoad %float %currRayHeight |
| %509 = OpLoad %float %stepSize |
| %510 = OpLoad %float %lastSampledHeight |
| %511 = OpFAdd %float %508 %509 |
| %512 = OpFSub %float %511 %510 |
| OpStore %delta2 %512 |
| %513 = OpLoad %float %delta1 |
| %514 = OpLoad %float %delta1 |
| %515 = OpLoad %float %delta2 |
| %516 = OpFAdd %float %514 %515 |
| %517 = OpFDiv %float %513 %516 |
| OpStore %ratio %517 |
| %518 = OpLoad %float %ratio |
| %519 = OpLoad %v2float %vLastOffset |
| %520 = OpLoad %float %ratio |
| %521 = OpLoad %v2float %vCurrOffset |
| %522 = OpVectorTimesScalar %v2float %519 %518 |
| %523 = OpFSub %float %float_1 %520 |
| %524 = OpVectorTimesScalar %v2float %521 %523 |
| %525 = OpFAdd %v2float %522 %524 |
| OpStore %vCurrOffset %525 |
| OpBranch %482 |
| %504 = OpLabel |
| %526 = OpLoad %float %stepSize |
| %527 = OpLoad %float %currRayHeight |
| %528 = OpFSub %float %527 %526 |
| OpStore %currRayHeight %528 |
| %529 = OpLoad %v2float %vCurrOffset |
| OpStore %vLastOffset %529 |
| %530 = OpLoad %float %stepSize |
| %531 = OpLoad %v2float %vMaxOffset |
| %532 = OpLoad %v2float %vCurrOffset |
| %533 = OpVectorTimesScalar %v2float %531 %530 |
| %534 = OpFAdd %v2float %532 %533 |
| OpStore %vCurrOffset %534 |
| %535 = OpLoad %float %currSampledHeight |
| OpStore %lastSampledHeight %535 |
| OpBranch %502 |
| %502 = OpLabel |
| OpBranch %483 |
| %483 = OpLabel |
| %536 = OpLoad %int %i |
| %537 = OpIAdd %int %536 %int_1 |
| OpStore %i %537 |
| OpBranch %481 |
| %482 = OpLabel |
| %538 = OpLoad %v2float %vCurrOffset |
| OpStore %parallaxOcclusion_0 %538 |
| %539 = OpLoad %v2float %parallaxOcclusion_0 |
| OpStore %uvOffset %539 |
| %540 = OpLoad %v2float %v_uv |
| %541 = OpLoad %v2float %uvOffset |
| %543 = OpLoad %28 %TextureSamplerSampler |
| %544 = OpLoad %25 %TextureSamplerTexture |
| %545 = OpSampledImage %374 %544 %543 |
| %546 = OpFAdd %v2float %540 %541 |
| %542 = OpImageSampleImplicitLod %v4float %545 %546 |
| %547 = OpAccessChain %_ptr_Uniform_float %x_269 %uint_2 |
| %548 = OpLoad %float %547 |
| %549 = OpLoad %mat3v3float %TBN |
| OpStore %param_8 %549 |
| %550 = OpCompositeExtract %float %542 0 |
| %551 = OpCompositeExtract %float %542 1 |
| %552 = OpCompositeExtract %float %542 2 |
| %553 = OpCompositeConstruct %v3float %550 %551 %552 |
| OpStore %param_9 %553 |
| %554 = OpFDiv %float %float_1 %548 |
| OpStore %param_10 %554 |
| %555 = OpFunctionCall %v3float %perturbNormal_mf33_vf3_f1_ %param_8 %param_9 %param_10 |
| %559 = OpLoad %v4float %output4 |
| %560 = OpCompositeExtract %float %555 0 |
| %561 = OpCompositeExtract %float %555 1 |
| %562 = OpCompositeExtract %float %555 2 |
| %563 = OpCompositeExtract %float %559 3 |
| %564 = OpCompositeConstruct %v4float %560 %561 %562 %563 |
| OpStore %output4 %564 |
| %565 = OpLoad %v2float %v_uv |
| %566 = OpLoad %v2float %uvOffset |
| %567 = OpFAdd %v2float %565 %566 |
| OpStore %output6 %567 |
| %568 = OpLoad %v2float %output6 |
| %570 = OpLoad %28 %TextureSampler1Sampler |
| %571 = OpLoad %25 %TextureSampler1Texture |
| %572 = OpSampledImage %374 %571 %570 |
| %569 = OpImageSampleImplicitLod %v4float %572 %568 |
| OpStore %tempTextureRead1 %569 |
| %573 = OpLoad %v4float %tempTextureRead1 |
| %574 = OpCompositeExtract %float %573 0 |
| %575 = OpCompositeExtract %float %573 1 |
| %576 = OpCompositeExtract %float %573 2 |
| %577 = OpCompositeConstruct %v3float %574 %575 %576 |
| OpStore %rgb1 %577 |
| %578 = OpAccessChain %_ptr_Uniform_v3float %x_269 %uint_4 |
| %579 = OpLoad %v3float %578 |
| %580 = OpLoad %v4float %v_output1 |
| %582 = OpCompositeExtract %float %580 0 |
| %583 = OpCompositeExtract %float %580 1 |
| %584 = OpCompositeExtract %float %580 2 |
| %585 = OpCompositeConstruct %v3float %582 %583 %584 |
| %586 = OpFSub %v3float %579 %585 |
| %581 = OpExtInst %v3float %88 Normalize %586 |
| OpStore %viewDirectionW_1 %581 |
| OpStore %shadow %float_1 |
| %587 = OpLoad %float %u_Float |
| %588 = OpFMul %float %float_1 %587 |
| OpStore %glossiness_1 %588 |
| OpStore %diffuseBase %22 |
| OpStore %specularBase %22 |
| %589 = OpLoad %v4float %output4 |
| %590 = OpCompositeExtract %float %589 0 |
| %591 = OpCompositeExtract %float %589 1 |
| %592 = OpCompositeExtract %float %589 2 |
| %593 = OpCompositeConstruct %v3float %590 %591 %592 |
| OpStore %normalW %593 |
| %594 = OpLoad %v3float %viewDirectionW_1 |
| OpStore %param_11 %594 |
| %595 = OpLoad %v3float %normalW |
| OpStore %param_12 %595 |
| %597 = OpAccessChain %_ptr_Uniform_v4float %light0 %uint_0 |
| %598 = OpLoad %v4float %597 |
| OpStore %param_13 %598 |
| %599 = OpAccessChain %_ptr_Uniform_v4float %light0 %uint_1 |
| %600 = OpLoad %v4float %599 |
| %601 = OpCompositeExtract %float %600 0 |
| %602 = OpCompositeExtract %float %600 1 |
| %603 = OpCompositeExtract %float %600 2 |
| %604 = OpCompositeConstruct %v3float %601 %602 %603 |
| OpStore %param_14 %604 |
| %605 = OpAccessChain %_ptr_Uniform_v4float %light0 %uint_2 |
| %606 = OpLoad %v4float %605 |
| %607 = OpCompositeExtract %float %606 0 |
| %608 = OpCompositeExtract %float %606 1 |
| %609 = OpCompositeExtract %float %606 2 |
| %610 = OpCompositeConstruct %v3float %607 %608 %609 |
| OpStore %param_15 %610 |
| %612 = OpAccessChain %_ptr_Uniform_v3float %light0 %uint_3 |
| %613 = OpLoad %v3float %612 |
| OpStore %param_16 %613 |
| %614 = OpLoad %float %glossiness_1 |
| OpStore %param_17 %614 |
| %615 = OpFunctionCall %lightingInfo %computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_ %param_11 %param_12 %param_13 %param_14 %param_15 %param_16 %param_17 |
| OpStore %info %615 |
| OpStore %shadow %float_1 |
| %623 = OpAccessChain %_ptr_Function_v3float %info %uint_0 |
| %624 = OpLoad %v3float %623 |
| %625 = OpLoad %float %shadow |
| %626 = OpLoad %v3float %diffuseBase |
| %627 = OpVectorTimesScalar %v3float %624 %625 |
| %628 = OpFAdd %v3float %626 %627 |
| OpStore %diffuseBase %628 |
| %629 = OpAccessChain %_ptr_Function_v3float %info %uint_1 |
| %630 = OpLoad %v3float %629 |
| %631 = OpLoad %float %shadow |
| %632 = OpLoad %v3float %specularBase |
| %633 = OpVectorTimesScalar %v3float %630 %631 |
| %634 = OpFAdd %v3float %632 %633 |
| OpStore %specularBase %634 |
| %635 = OpLoad %v3float %diffuseBase |
| %636 = OpLoad %v3float %rgb1 |
| %637 = OpFMul %v3float %635 %636 |
| OpStore %diffuseOutput %637 |
| %638 = OpLoad %v3float %specularBase |
| %639 = OpLoad %v3float %u_Color |
| %640 = OpFMul %v3float %638 %639 |
| OpStore %specularOutput %640 |
| %641 = OpLoad %v3float %diffuseOutput |
| %642 = OpLoad %v3float %specularOutput |
| %643 = OpFAdd %v3float %641 %642 |
| OpStore %output3 %643 |
| %644 = OpLoad %v3float %output3 |
| %645 = OpCompositeExtract %float %644 0 |
| %646 = OpCompositeExtract %float %644 1 |
| %647 = OpCompositeExtract %float %644 2 |
| %648 = OpCompositeConstruct %v4float %645 %646 %647 %float_1 |
| OpStore %glFragColor %648 |
| OpReturn |
| OpFunctionEnd |
| %main_inner = OpFunction %main_out None %649 |
| %vMainuv_param = OpFunctionParameter %v2float |
| %v_output1_param = OpFunctionParameter %v4float |
| %gl_FrontFacing_param = OpFunctionParameter %bool |
| %v_uv_param = OpFunctionParameter %v2float |
| %v_output2_param = OpFunctionParameter %v4float |
| %657 = OpLabel |
| OpStore %vMainuv %vMainuv_param |
| OpStore %v_output1 %v_output1_param |
| OpStore %gl_FrontFacing %gl_FrontFacing_param |
| OpStore %v_uv %v_uv_param |
| OpStore %v_output2 %v_output2_param |
| %658 = OpFunctionCall %void %main_1 |
| %659 = OpLoad %v4float %glFragColor |
| %660 = OpCompositeConstruct %main_out %659 |
| OpReturnValue %660 |
| OpFunctionEnd |
| %main = OpFunction %void None %310 |
| %662 = OpLabel |
| %664 = OpLoad %v2float %vMainuv_param_1 |
| %665 = OpLoad %v4float %v_output1_param_1 |
| %666 = OpLoad %bool %gl_FrontFacing_param_1 |
| %667 = OpLoad %v2float %v_uv_param_1 |
| %668 = OpLoad %v4float %v_output2_param_1 |
| %663 = OpFunctionCall %main_out %main_inner %664 %665 %666 %667 %668 |
| %669 = OpCompositeExtract %v4float %663 0 |
| OpStore %glFragColor_1_1 %669 |
| OpReturn |
| OpFunctionEnd |