blob: 31b8a9ec1e9166fe79148582745c1f6e5f584ebe [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 648
; Schema: 0
OpCapability Shader
%83 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %main_loc1_Input %main_loc0_Input %main_front_facing_Input %main_loc3_Input %main_loc2_Input %main_loc0_Output
OpExecutionMode %main OriginUpperLeft
OpName %u_Float "u_Float"
OpName %u_Color "u_Color"
OpName %TextureSamplerTexture "TextureSamplerTexture"
OpName %TextureSamplerSampler "TextureSamplerSampler"
OpName %vMainuv "vMainuv"
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 %LeftOver "LeftOver"
OpMemberName %x_269_block 0 "inner"
OpName %x_269_block "x_269_block"
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"
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"
OpMemberName %light0_block 0 "inner"
OpName %light0_block "light0_block"
OpName %glFragColor "glFragColor"
OpName %main_loc1_Input "main_loc1_Input"
OpName %main_loc0_Input "main_loc0_Input"
OpName %main_front_facing_Input "main_front_facing_Input"
OpName %main_loc3_Input "main_loc3_Input"
OpName %main_loc2_Input "main_loc2_Input"
OpName %main_loc0_Output "main_loc0_Output"
OpName %cotangent_frame_vf3_vf3_vf2_vf2_ "cotangent_frame_vf3_vf3_vf2_vf2_"
OpName %normal_1_root "normal_1_root"
OpName %p_root "p_root"
OpName %uv_root "uv_root"
OpName %tangentSpaceParams_root "tangentSpaceParams_root"
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 %x_133 "x_133"
OpName %x_136 "x_136"
OpName %x_139 "x_139"
OpName %x_142 "x_142"
OpName %x_145 "x_145"
OpName %x_146 "x_146"
OpName %x_149 "x_149"
OpName %x_150 "x_150"
OpName %x_153 "x_153"
OpName %x_155 "x_155"
OpName %x_157 "x_157"
OpName %x_159 "x_159"
OpName %x_163 "x_163"
OpName %x_165 "x_165"
OpName %x_167 "x_167"
OpName %x_169 "x_169"
OpName %x_173 "x_173"
OpName %x_174 "x_174"
OpName %x_177 "x_177"
OpName %x_178 "x_178"
OpName %x_181 "x_181"
OpName %x_182 "x_182"
OpName %x_184 "x_184"
OpName %x_185 "x_185"
OpName %x_189 "x_189"
OpName %x_190 "x_190"
OpName %x_191 "x_191"
OpName %x_192 "x_192"
OpName %x_193 "x_193"
OpName %x_194 "x_194"
OpName %x_195 "x_195"
OpName %transposeMat3_mf33_ "transposeMat3_mf33_"
OpName %inMatrix_root "inMatrix_root"
OpName %i0 "i0"
OpName %i1 "i1"
OpName %i2 "i2"
OpName %outMatrix "outMatrix"
OpName %x_60 "x_60"
OpName %x_64 "x_64"
OpName %x_68 "x_68"
OpName %x_73 "x_73"
OpName %x_75 "x_75"
OpName %x_77 "x_77"
OpName %x_78 "x_78"
OpName %x_81 "x_81"
OpName %x_83 "x_83"
OpName %x_85 "x_85"
OpName %x_86 "x_86"
OpName %x_89 "x_89"
OpName %x_91 "x_91"
OpName %x_93 "x_93"
OpName %x_94 "x_94"
OpName %x_110 "x_110"
OpName %perturbNormalBase_mf33_vf3_f1_ "perturbNormalBase_mf33_vf3_f1_"
OpName %cotangentFrame_root "cotangentFrame_root"
OpName %normal_root "normal_root"
OpName %scale_root "scale_root"
OpName %x_113 "x_113"
OpName %x_114 "x_114"
OpName %perturbNormal_mf33_vf3_f1_ "perturbNormal_mf33_vf3_f1_"
OpName %cotangentFrame_1_root "cotangentFrame_1_root"
OpName %textureSample_root "textureSample_root"
OpName %scale_1_root "scale_1_root"
OpName %param "param"
OpName %param_1 "param_1"
OpName %param_2 "param_2"
OpName %x_119 "x_119"
OpName %x_125 "x_125"
OpName %x_128 "x_128"
OpName %x_129 "x_129"
OpName %computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_ "computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_"
OpMemberName %lightingInfo 0 "diffuse"
OpMemberName %lightingInfo 1 "specular"
OpName %lightingInfo "lightingInfo"
OpName %viewDirectionW_root "viewDirectionW_root"
OpName %vNormal_root "vNormal_root"
OpName %lightData_root "lightData_root"
OpName %diffuseColor_root "diffuseColor_root"
OpName %specularColor_root "specularColor_root"
OpName %groundColor_root "groundColor_root"
OpName %glossiness_root "glossiness_root"
OpName %ndl "ndl"
OpName %result "result"
OpName %angleW "angleW"
OpName %specComp "specComp"
OpName %x_212 "x_212"
OpName %x_213 "x_213"
OpName %x_220 "x_220"
OpName %x_221 "x_221"
OpName %x_222 "x_222"
OpName %x_227 "x_227"
OpName %x_228 "x_228"
OpName %x_233 "x_233"
OpName %x_234 "x_234"
OpName %x_237 "x_237"
OpName %x_238 "x_238"
OpName %x_241 "x_241"
OpName %x_242 "x_242"
OpName %x_245 "x_245"
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 %x_261 "x_261"
OpName %x_262 "x_262"
OpName %x_264 "x_264"
OpName %x_273 "x_273"
OpName %x_279 "x_279"
OpName %x_282 "x_282"
OpName %x_292 "x_292"
OpName %x_298 "x_298"
OpName %x_307 "x_307"
OpName %x_310 "x_310"
OpName %x_312 "x_312"
OpName %x_317 "x_317"
OpName %x_320 "x_320"
OpName %x_324 "x_324"
OpName %x_325 "x_325"
OpName %x_328 "x_328"
OpName %x_329 "x_329"
OpName %x_331 "x_331"
OpName %x_332 "x_332"
OpName %x_334 "x_334"
OpName %x_337 "x_337"
OpName %x_338 "x_338"
OpName %x_345 "x_345"
OpName %x_346 "x_346"
OpName %x_349 "x_349"
OpName %x_350 "x_350"
OpName %x_352 "x_352"
OpName %x_356 "x_356"
OpName %x_357 "x_357"
OpName %x_361 "x_361"
OpName %x_362 "x_362"
OpName %x_365 "x_365"
OpName %x_366 "x_366"
OpName %x_374 "x_374"
OpName %x_444 "x_444"
OpName %x_445 "x_445"
OpName %x_449 "x_449"
OpName %x_450 "x_450"
OpName %x_452 "x_452"
OpName %x_454 "x_454"
OpName %x_457 "x_457"
OpName %x_461 "x_461"
OpName %x_462 "x_462"
OpName %x_465 "x_465"
OpName %x_466 "x_466"
OpName %x_474 "x_474"
OpName %x_475 "x_475"
OpName %x_477 "x_477"
OpName %x_481 "x_481"
OpName %x_482 "x_482"
OpName %x_488 "x_488"
OpName %x_494 "x_494"
OpName %x_501 "x_501"
OpName %x_503 "x_503"
OpName %x_507 "x_507"
OpName %x_510 "x_510"
OpName %x_514 "x_514"
OpName %x_518 "x_518"
OpName %x_520 "x_520"
OpName %x_521 "x_521"
OpName %x_523 "x_523"
OpName %x_524 "x_524"
OpName %x_526 "x_526"
OpName %x_529 "x_529"
OpName %x_530 "x_530"
OpName %x_532 "x_532"
OpName %x_535 "x_535"
OpName %x_536 "x_536"
OpName %x_539 "x_539"
OpName %x_540 "x_540"
OpName %x_543 "x_543"
OpName %x_544 "x_544"
OpName %x_548 "x_548"
OpName %x_303 "x_303"
OpName %x_305 "x_305"
OpName %tint_loop_idx "tint_loop_idx"
OpName %x_388 "x_388"
OpName %x_394 "x_394"
OpName %x_395 "x_395"
OpName %x_397 "x_397"
OpName %x_400 "x_400"
OpName %x_401 "x_401"
OpName %tint_low_inc "tint_low_inc"
OpName %tint_carry "tint_carry"
OpName %x_441 "x_441"
OpName %x_406 "x_406"
OpName %x_407 "x_407"
OpName %x_410 "x_410"
OpName %x_411 "x_411"
OpName %x_413 "x_413"
OpName %x_416 "x_416"
OpName %x_417 "x_417"
OpName %x_418 "x_418"
OpName %x_421 "x_421"
OpName %x_422 "x_422"
OpName %x_424 "x_424"
OpName %x_426 "x_426"
OpName %x_431 "x_431"
OpName %x_432 "x_432"
OpName %x_434 "x_434"
OpName %x_435 "x_435"
OpName %x_436 "x_436"
OpName %x_438 "x_438"
OpName %x_440 "x_440"
OpName %main_inner "main_inner"
OpMemberName %main_out 0 "glFragColor_1"
OpName %main_out "main_out"
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 %TextureSamplerTexture DescriptorSet 2
OpDecorate %TextureSamplerTexture Binding 1
OpDecorate %TextureSamplerSampler DescriptorSet 2
OpDecorate %TextureSamplerSampler Binding 0
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
OpMemberDecorate %x_269_block 0 Offset 0
OpDecorate %x_269_block Block
OpDecorate %19 DescriptorSet 2
OpDecorate %19 Binding 6
OpDecorate %19 NonWritable
OpDecorate %TextureSampler1Texture DescriptorSet 2
OpDecorate %TextureSampler1Texture Binding 3
OpDecorate %TextureSampler1Sampler DescriptorSet 2
OpDecorate %TextureSampler1Sampler Binding 2
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
OpMemberDecorate %light0_block 0 Offset 0
OpDecorate %light0_block Block
OpDecorate %37 DescriptorSet 0
OpDecorate %37 Binding 5
OpDecorate %37 NonWritable
OpDecorate %main_loc1_Input Location 1
OpDecorate %main_loc0_Input Location 0
OpDecorate %main_front_facing_Input BuiltIn FrontFacing
OpDecorate %main_loc3_Input Location 3
OpDecorate %main_loc2_Input Location 2
OpDecorate %main_loc0_Output Location 0
%float = OpTypeFloat 32
%_ptr_Private_float = OpTypePointer Private %float
%4 = OpConstantNull %float
%u_Float = OpVariable %_ptr_Private_float Private %4
%v3float = OpTypeVector %float 3
%_ptr_Private_v3float = OpTypePointer Private %v3float
%8 = OpConstantNull %v3float
%u_Color = OpVariable %_ptr_Private_v3float Private %8
%11 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
%TextureSamplerTexture = OpVariable %_ptr_UniformConstant_11 UniformConstant
%14 = OpTypeSampler
%_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14
%TextureSamplerSampler = OpVariable %_ptr_UniformConstant_14 UniformConstant
%v2float = OpTypeVector %float 2
%_ptr_Private_v2float = OpTypePointer Private %v2float
%18 = OpConstantNull %v2float
%vMainuv = OpVariable %_ptr_Private_v2float Private %18
%v4float = OpTypeVector %float 4
%mat4v4float = OpTypeMatrix %v4float 4
%uint = OpTypeInt 32 0
%LeftOver = OpTypeStruct %mat4v4float %mat4v4float %float %uint %v3float %float %float %uint %v2float
%x_269_block = OpTypeStruct %LeftOver
%_ptr_Uniform_x_269_block = OpTypePointer Uniform %x_269_block
%19 = OpVariable %_ptr_Uniform_x_269_block Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_397 = OpConstantNull %v4float
%v_output1 = OpVariable %_ptr_Private_v4float Private %x_397
%bool = OpTypeBool
%_ptr_Private_bool = OpTypePointer Private %bool
%32 = OpConstantNull %bool
%gl_FrontFacing = OpVariable %_ptr_Private_bool Private %32
%v_uv = OpVariable %_ptr_Private_v2float Private %18
%v_output2 = OpVariable %_ptr_Private_v4float Private %x_397
%TextureSampler1Texture = OpVariable %_ptr_UniformConstant_11 UniformConstant
%TextureSampler1Sampler = OpVariable %_ptr_UniformConstant_14 UniformConstant
%Light0 = OpTypeStruct %v4float %v4float %v4float %v3float %uint %v4float %v2float
%light0_block = OpTypeStruct %Light0
%_ptr_Uniform_light0_block = OpTypePointer Uniform %light0_block
%37 = OpVariable %_ptr_Uniform_light0_block Uniform
%glFragColor = OpVariable %_ptr_Private_v4float Private %x_397
%_ptr_Input_v2float = OpTypePointer Input %v2float
%main_loc1_Input = OpVariable %_ptr_Input_v2float Input
%_ptr_Input_v4float = OpTypePointer Input %v4float
%main_loc0_Input = OpVariable %_ptr_Input_v4float Input
%_ptr_Input_bool = OpTypePointer Input %bool
%main_front_facing_Input = OpVariable %_ptr_Input_bool Input
%main_loc3_Input = OpVariable %_ptr_Input_v2float Input
%main_loc2_Input = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%main_loc0_Output = OpVariable %_ptr_Output_v4float Output
%mat3v3float = OpTypeMatrix %v3float 3
%_ptr_Function_v3float = OpTypePointer Function %v3float
%_ptr_Function_v2float = OpTypePointer Function %v2float
%60 = 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
%146 = OpTypeFunction %mat3v3float %_ptr_Function_mat3v3float
%152 = OpConstantNull %mat3v3float
%uint_2 = OpConstant %uint 2
%199 = OpTypeFunction %v3float %_ptr_Function_mat3v3float %_ptr_Function_v3float %_ptr_Function_float
%float_2 = OpConstant %float 2
%float_1 = OpConstant %float 1
%218 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%lightingInfo = OpTypeStruct %v3float %v3float
%_ptr_Function_v4float = OpTypePointer Function %v4float
%232 = 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
%237 = OpConstantNull %lightingInfo
%float_0_5 = OpConstant %float 0.5
%float_0 = OpConstant %float 0
%void = OpTypeVoid
%280 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%310 = OpConstantNull %int
%float_100 = OpConstant %float 100
%339 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5
%344 = OpTypeSampledImage %11
%_ptr_Uniform_float = OpTypePointer Uniform %float
%uint_6 = OpConstant %uint 6
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
%uint_4 = OpConstant %uint 4
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%uint_8 = OpConstant %uint 8
%uint_5 = OpConstant %uint 5
%float_n11 = OpConstant %float -11
%float_15 = OpConstant %float 15
%int_0 = OpConstant %int 0
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
%uint_3 = OpConstant %uint 3
%v2uint = OpTypeVector %uint 2
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_4294967295 = OpConstant %uint 4294967295
%556 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295
%560 = OpConstantNull %v2uint
%v2bool = OpTypeVector %bool 2
%int_15 = OpConstant %int 15
%_ptr_Function_uint = OpTypePointer Function %uint
%int_1 = OpConstant %int 1
%main_out = OpTypeStruct %v4float
%634 = OpTypeFunction %main_out %v2float %v4float %bool %v2float %v4float
%cotangent_frame_vf3_vf3_vf2_vf2_ = OpFunction %mat3v3float None %60
%normal_1_root = OpFunctionParameter %_ptr_Function_v3float
%p_root = OpFunctionParameter %_ptr_Function_v3float
%uv_root = OpFunctionParameter %_ptr_Function_v2float
%tangentSpaceParams_root = OpFunctionParameter %_ptr_Function_v2float
%61 = OpLabel
%dp1 = OpVariable %_ptr_Function_v3float Function %8
%dp2 = OpVariable %_ptr_Function_v3float Function %8
%duv1 = OpVariable %_ptr_Function_v2float Function %18
%duv2 = OpVariable %_ptr_Function_v2float Function %18
%dp2perp = OpVariable %_ptr_Function_v3float Function %8
%dp1perp = OpVariable %_ptr_Function_v3float Function %8
%tangent = OpVariable %_ptr_Function_v3float Function %8
%bitangent = OpVariable %_ptr_Function_v3float Function %8
%invmax = OpVariable %_ptr_Function_float Function %4
%x_133 = OpLoad %v3float %p_root None
%73 = OpDPdx %v3float %x_133
OpStore %dp1 %73 None
%x_136 = OpLoad %v3float %p_root None
%75 = OpDPdy %v3float %x_136
OpStore %dp2 %75 None
%x_139 = OpLoad %v2float %uv_root None
%77 = OpDPdx %v2float %x_139
OpStore %duv1 %77 None
%x_142 = OpLoad %v2float %uv_root None
%79 = OpDPdy %v2float %x_142
OpStore %duv2 %79 None
%x_145 = OpLoad %v3float %dp2 None
%x_146 = OpLoad %v3float %normal_1_root None
%82 = OpExtInst %v3float %83 Cross %x_145 %x_146
OpStore %dp2perp %82 None
%x_149 = OpLoad %v3float %normal_1_root None
%x_150 = OpLoad %v3float %dp1 None
%86 = OpExtInst %v3float %83 Cross %x_149 %x_150
OpStore %dp1perp %86 None
%x_153 = OpLoad %v3float %dp2perp None
%88 = OpAccessChain %_ptr_Function_float %duv1 %uint_0
%x_155 = OpLoad %float %88 None
%x_157 = OpLoad %v3float %dp1perp None
%92 = OpAccessChain %_ptr_Function_float %duv2 %uint_0
%x_159 = OpLoad %float %92 None
%94 = OpVectorTimesScalar %v3float %x_153 %x_155
%95 = OpVectorTimesScalar %v3float %x_157 %x_159
%96 = OpFAdd %v3float %94 %95
OpStore %tangent %96 None
%x_163 = OpLoad %v3float %dp2perp None
%98 = OpAccessChain %_ptr_Function_float %duv1 %uint_1
%x_165 = OpLoad %float %98 None
%x_167 = OpLoad %v3float %dp1perp None
%102 = OpAccessChain %_ptr_Function_float %duv2 %uint_1
%x_169 = OpLoad %float %102 None
%104 = OpVectorTimesScalar %v3float %x_163 %x_165
%105 = OpVectorTimesScalar %v3float %x_167 %x_169
%106 = OpFAdd %v3float %104 %105
OpStore %bitangent %106 None
%107 = OpAccessChain %_ptr_Function_float %tangentSpaceParams_root %uint_0
%x_173 = OpLoad %float %107 None
%x_174 = OpLoad %v3float %tangent None
%110 = OpVectorTimesScalar %v3float %x_174 %x_173
OpStore %tangent %110 None
%111 = OpAccessChain %_ptr_Function_float %tangentSpaceParams_root %uint_1
%x_177 = OpLoad %float %111 None
%x_178 = OpLoad %v3float %bitangent None
%114 = OpVectorTimesScalar %v3float %x_178 %x_177
OpStore %bitangent %114 None
%x_181 = OpLoad %v3float %tangent None
%x_182 = OpLoad %v3float %tangent None
%x_184 = OpLoad %v3float %bitangent None
%x_185 = OpLoad %v3float %bitangent None
%119 = OpDot %float %x_181 %x_182
%120 = OpDot %float %x_184 %x_185
%121 = OpExtInst %float %83 NMax %119 %120
%122 = OpExtInst %float %83 InverseSqrt %121
OpStore %invmax %122 None
%x_189 = OpLoad %v3float %tangent None
%x_190 = OpLoad %float %invmax None
%x_191 = OpVectorTimesScalar %v3float %x_189 %x_190
%x_192 = OpLoad %v3float %bitangent None
%x_193 = OpLoad %float %invmax None
%x_194 = OpVectorTimesScalar %v3float %x_192 %x_193
%x_195 = OpLoad %v3float %normal_1_root None
%130 = OpCompositeExtract %float %x_191 0
%131 = OpCompositeExtract %float %x_191 1
%132 = OpCompositeExtract %float %x_191 2
%133 = OpCompositeConstruct %v3float %130 %131 %132
%134 = OpCompositeExtract %float %x_194 0
%135 = OpCompositeExtract %float %x_194 1
%136 = OpCompositeExtract %float %x_194 2
%137 = OpCompositeConstruct %v3float %134 %135 %136
%138 = OpCompositeExtract %float %x_195 0
%139 = OpCompositeExtract %float %x_195 1
%140 = OpCompositeExtract %float %x_195 2
%141 = OpCompositeConstruct %v3float %138 %139 %140
%142 = OpCompositeConstruct %mat3v3float %133 %137 %141
OpReturnValue %142
OpFunctionEnd
%transposeMat3_mf33_ = OpFunction %mat3v3float None %146
%inMatrix_root = OpFunctionParameter %_ptr_Function_mat3v3float
%147 = OpLabel
%i0 = OpVariable %_ptr_Function_v3float Function %8
%i1 = OpVariable %_ptr_Function_v3float Function %8
%i2 = OpVariable %_ptr_Function_v3float Function %8
%outMatrix = OpVariable %_ptr_Function_mat3v3float Function %152
%153 = OpAccessChain %_ptr_Function_v3float %inMatrix_root %uint_0
%x_60 = OpLoad %v3float %153 None
OpStore %i0 %x_60 None
%155 = OpAccessChain %_ptr_Function_v3float %inMatrix_root %uint_1
%x_64 = OpLoad %v3float %155 None
OpStore %i1 %x_64 None
%157 = OpAccessChain %_ptr_Function_v3float %inMatrix_root %uint_2
%x_68 = OpLoad %v3float %157 None
OpStore %i2 %x_68 None
%160 = OpAccessChain %_ptr_Function_float %i0 %uint_0
%x_73 = OpLoad %float %160 None
%162 = OpAccessChain %_ptr_Function_float %i1 %uint_0
%x_75 = OpLoad %float %162 None
%164 = OpAccessChain %_ptr_Function_float %i2 %uint_0
%x_77 = OpLoad %float %164 None
%x_78 = OpCompositeConstruct %v3float %x_73 %x_75 %x_77
%167 = OpAccessChain %_ptr_Function_float %i0 %uint_1
%x_81 = OpLoad %float %167 None
%169 = OpAccessChain %_ptr_Function_float %i1 %uint_1
%x_83 = OpLoad %float %169 None
%171 = OpAccessChain %_ptr_Function_float %i2 %uint_1
%x_85 = OpLoad %float %171 None
%x_86 = OpCompositeConstruct %v3float %x_81 %x_83 %x_85
%174 = OpAccessChain %_ptr_Function_float %i0 %uint_2
%x_89 = OpLoad %float %174 None
%176 = OpAccessChain %_ptr_Function_float %i1 %uint_2
%x_91 = OpLoad %float %176 None
%178 = OpAccessChain %_ptr_Function_float %i2 %uint_2
%x_93 = OpLoad %float %178 None
%x_94 = OpCompositeConstruct %v3float %x_89 %x_91 %x_93
%181 = OpCompositeExtract %float %x_78 0
%182 = OpCompositeExtract %float %x_78 1
%183 = OpCompositeExtract %float %x_78 2
%184 = OpCompositeConstruct %v3float %181 %182 %183
%185 = OpCompositeExtract %float %x_86 0
%186 = OpCompositeExtract %float %x_86 1
%187 = OpCompositeExtract %float %x_86 2
%188 = OpCompositeConstruct %v3float %185 %186 %187
%189 = OpCompositeExtract %float %x_94 0
%190 = OpCompositeExtract %float %x_94 1
%191 = OpCompositeExtract %float %x_94 2
%192 = OpCompositeConstruct %v3float %189 %190 %191
%193 = OpCompositeConstruct %mat3v3float %184 %188 %192
OpStore %outMatrix %193 None
%x_110 = OpLoad %mat3v3float %outMatrix None
OpReturnValue %x_110
OpFunctionEnd
%perturbNormalBase_mf33_vf3_f1_ = OpFunction %v3float None %199
%cotangentFrame_root = OpFunctionParameter %_ptr_Function_mat3v3float
%normal_root = OpFunctionParameter %_ptr_Function_v3float
%scale_root = OpFunctionParameter %_ptr_Function_float
%200 = OpLabel
%x_113 = OpLoad %mat3v3float %cotangentFrame_root None
%x_114 = OpLoad %v3float %normal_root None
%203 = OpMatrixTimesVector %v3float %x_113 %x_114
%204 = OpExtInst %v3float %83 Normalize %203
OpReturnValue %204
OpFunctionEnd
%perturbNormal_mf33_vf3_f1_ = OpFunction %v3float None %199
%cotangentFrame_1_root = OpFunctionParameter %_ptr_Function_mat3v3float
%textureSample_root = OpFunctionParameter %_ptr_Function_v3float
%scale_1_root = OpFunctionParameter %_ptr_Function_float
%209 = OpLabel
%param = OpVariable %_ptr_Function_mat3v3float Function %152
%param_1 = OpVariable %_ptr_Function_v3float Function %8
%param_2 = OpVariable %_ptr_Function_float Function %4
%x_119 = OpLoad %v3float %textureSample_root None
%x_125 = OpLoad %mat3v3float %cotangentFrame_1_root None
OpStore %param %x_125 None
%215 = OpVectorTimesScalar %v3float %x_119 %float_2
%217 = OpFSub %v3float %215 %218
OpStore %param_1 %217 None
%x_128 = OpLoad %float %scale_1_root None
OpStore %param_2 %x_128 None
%x_129 = OpFunctionCall %v3float %perturbNormalBase_mf33_vf3_f1_ %param %param_1 %param_2
OpReturnValue %x_129
OpFunctionEnd
%computeHemisphericLighting_vf3_vf3_vf4_vf3_vf3_vf3_f1_ = OpFunction %lightingInfo None %232
%viewDirectionW_root = OpFunctionParameter %_ptr_Function_v3float
%vNormal_root = OpFunctionParameter %_ptr_Function_v3float
%lightData_root = OpFunctionParameter %_ptr_Function_v4float
%diffuseColor_root = OpFunctionParameter %_ptr_Function_v3float
%specularColor_root = OpFunctionParameter %_ptr_Function_v3float
%groundColor_root = OpFunctionParameter %_ptr_Function_v3float
%glossiness_root = OpFunctionParameter %_ptr_Function_float
%233 = OpLabel
%ndl = OpVariable %_ptr_Function_float Function %4
%result = OpVariable %_ptr_Function_lightingInfo Function %237
%angleW = OpVariable %_ptr_Function_v3float Function %8
%specComp = OpVariable %_ptr_Function_float Function %4
%x_212 = OpLoad %v3float %vNormal_root None
%x_213 = OpLoad %v4float %lightData_root None
%242 = OpCompositeExtract %float %x_213 0
%243 = OpCompositeExtract %float %x_213 1
%244 = OpCompositeExtract %float %x_213 2
%245 = OpCompositeConstruct %v3float %242 %243 %244
%246 = OpDot %float %x_212 %245
%247 = OpFMul %float %246 %float_0_5
%249 = OpFAdd %float %247 %float_0_5
OpStore %ndl %249 None
%x_220 = OpLoad %v3float %groundColor_root None
%x_221 = OpLoad %v3float %diffuseColor_root None
%x_222 = OpLoad %float %ndl None
%253 = OpAccessChain %_ptr_Function_v3float %result %uint_0
%254 = OpCompositeConstruct %v3float %x_222 %x_222 %x_222
%255 = OpExtInst %v3float %83 FMix %x_220 %x_221 %254
OpStore %253 %255 None
%x_227 = OpLoad %v3float %viewDirectionW_root None
%x_228 = OpLoad %v4float %lightData_root None
%258 = OpCompositeExtract %float %x_228 0
%259 = OpCompositeExtract %float %x_228 1
%260 = OpCompositeExtract %float %x_228 2
%261 = OpCompositeConstruct %v3float %258 %259 %260
%262 = OpFAdd %v3float %x_227 %261
%263 = OpExtInst %v3float %83 Normalize %262
OpStore %angleW %263 None
%x_233 = OpLoad %v3float %vNormal_root None
%x_234 = OpLoad %v3float %angleW None
%266 = OpDot %float %x_233 %x_234
%267 = OpExtInst %float %83 NMax %float_0 %266
OpStore %specComp %267 None
%x_237 = OpLoad %float %specComp None
%x_238 = OpLoad %float %glossiness_root None
%271 = OpExtInst %float %83 NMax %float_1 %x_238
%272 = OpExtInst %float %83 Pow %x_237 %271
OpStore %specComp %272 None
%x_241 = OpLoad %float %specComp None
%x_242 = OpLoad %v3float %specularColor_root None
%275 = OpAccessChain %_ptr_Function_v3float %result %uint_1
%276 = OpVectorTimesScalar %v3float %x_242 %x_241
OpStore %275 %276 None
%x_245 = OpLoad %lightingInfo %result None
OpReturnValue %x_245
OpFunctionEnd
%main_1 = OpFunction %void None %280
%281 = OpLabel
%tempTextureRead = OpVariable %_ptr_Function_v4float Function %x_397
%rgb = OpVariable %_ptr_Function_v3float Function %8
%output5 = OpVariable %_ptr_Function_v3float Function %8
%output4 = OpVariable %_ptr_Function_v4float Function %x_397
%uvOffset = OpVariable %_ptr_Function_v2float Function %18
%normalScale = OpVariable %_ptr_Function_float Function %4
%TBNUV = OpVariable %_ptr_Function_v2float Function %18
%x_299 = OpVariable %_ptr_Function_v2float Function %18
%TBN = OpVariable %_ptr_Function_mat3v3float Function %152
%param_3 = OpVariable %_ptr_Function_v3float Function %8
%param_4 = OpVariable %_ptr_Function_v3float Function %8
%param_5 = OpVariable %_ptr_Function_v2float Function %18
%param_6 = OpVariable %_ptr_Function_v2float Function %18
%invTBN = OpVariable %_ptr_Function_mat3v3float Function %152
%param_7 = OpVariable %_ptr_Function_mat3v3float Function %152
%parallaxLimit = OpVariable %_ptr_Function_float Function %4
%vOffsetDir = OpVariable %_ptr_Function_v2float Function %18
%vMaxOffset = OpVariable %_ptr_Function_v2float Function %18
%numSamples = OpVariable %_ptr_Function_float Function %4
%stepSize = OpVariable %_ptr_Function_float Function %4
%currRayHeight = OpVariable %_ptr_Function_float Function %4
%vCurrOffset = OpVariable %_ptr_Function_v2float Function %18
%vLastOffset = OpVariable %_ptr_Function_v2float Function %18
%lastSampledHeight = OpVariable %_ptr_Function_float Function %4
%currSampledHeight = OpVariable %_ptr_Function_float Function %4
%i = OpVariable %_ptr_Function_int Function %310
%delta1 = OpVariable %_ptr_Function_float Function %4
%delta2 = OpVariable %_ptr_Function_float Function %4
%ratio = OpVariable %_ptr_Function_float Function %4
%parallaxOcclusion_0 = OpVariable %_ptr_Function_v2float Function %18
%param_8 = OpVariable %_ptr_Function_mat3v3float Function %152
%param_9 = OpVariable %_ptr_Function_v3float Function %8
%param_10 = OpVariable %_ptr_Function_float Function %4
%output6 = OpVariable %_ptr_Function_v2float Function %18
%tempTextureRead1 = OpVariable %_ptr_Function_v4float Function %x_397
%rgb1 = OpVariable %_ptr_Function_v3float Function %8
%viewDirectionW_1 = OpVariable %_ptr_Function_v3float Function %8
%shadow = OpVariable %_ptr_Function_float Function %4
%glossiness_1 = OpVariable %_ptr_Function_float Function %4
%diffuseBase = OpVariable %_ptr_Function_v3float Function %8
%specularBase = OpVariable %_ptr_Function_v3float Function %8
%normalW = OpVariable %_ptr_Function_v3float Function %8
%info = OpVariable %_ptr_Function_lightingInfo Function %237
%param_11 = OpVariable %_ptr_Function_v3float Function %8
%param_12 = OpVariable %_ptr_Function_v3float Function %8
%param_13 = OpVariable %_ptr_Function_v4float Function %x_397
%param_14 = OpVariable %_ptr_Function_v3float Function %8
%param_15 = OpVariable %_ptr_Function_v3float Function %8
%param_16 = OpVariable %_ptr_Function_v3float Function %8
%param_17 = OpVariable %_ptr_Function_float Function %4
%diffuseOutput = OpVariable %_ptr_Function_v3float Function %8
%specularOutput = OpVariable %_ptr_Function_v3float Function %8
%output3 = OpVariable %_ptr_Function_v3float Function %8
%tint_loop_idx = OpVariable %_ptr_Function_v2uint Function
OpStore %u_Float %float_100 None
OpStore %u_Color %339 None
%x_261 = OpLoad %v2float %vMainuv None
%341 = OpLoad %11 %TextureSamplerTexture None
%342 = OpLoad %14 %TextureSamplerSampler None
%343 = OpSampledImage %344 %341 %342
%x_262 = OpImageSampleImplicitLod %v4float %343 %x_261 None
OpStore %tempTextureRead %x_262 None
%x_264 = OpLoad %v4float %tempTextureRead None
%347 = OpAccessChain %_ptr_Uniform_float %19 %uint_0 %uint_6
%x_273 = OpLoad %float %347 None
%351 = OpCompositeExtract %float %x_264 0
%352 = OpCompositeExtract %float %x_264 1
%353 = OpCompositeExtract %float %x_264 2
%354 = OpCompositeConstruct %v3float %351 %352 %353
%355 = OpVectorTimesScalar %v3float %354 %x_273
OpStore %rgb %355 None
%356 = OpAccessChain %_ptr_Uniform_v3float %19 %uint_0 %uint_4
%x_279 = OpLoad %v3float %356 None
%x_282 = OpLoad %v4float %v_output1 None
%361 = OpCompositeExtract %float %x_282 0
%362 = OpCompositeExtract %float %x_282 1
%363 = OpCompositeExtract %float %x_282 2
%364 = OpCompositeConstruct %v3float %361 %362 %363
%365 = OpFSub %v3float %x_279 %364
%366 = OpExtInst %v3float %83 Normalize %365
OpStore %output5 %366 None
OpStore %output4 %x_397 None
OpStore %uvOffset %18 None
%367 = OpAccessChain %_ptr_Uniform_float %19 %uint_0 %uint_2
%x_292 = OpLoad %float %367 None
%369 = OpFDiv %float %float_1 %x_292
OpStore %normalScale %369 None
%x_298 = OpLoad %bool %gl_FrontFacing None
OpSelectionMerge %371 None
OpBranchConditional %x_298 %372 %373
%372 = OpLabel
%x_303 = OpLoad %v2float %v_uv None
OpStore %x_299 %x_303 None
OpBranch %371
%373 = OpLabel
%x_305 = OpLoad %v2float %v_uv None
%552 = OpFNegate %v2float %x_305
OpStore %x_299 %552 None
OpBranch %371
%371 = OpLabel
%x_307 = OpLoad %v2float %x_299 None
OpStore %TBNUV %x_307 None
%x_310 = OpLoad %v4float %v_output2 None
%x_312 = OpLoad %float %normalScale None
%377 = OpCompositeExtract %float %x_310 0
%378 = OpCompositeExtract %float %x_310 1
%379 = OpCompositeExtract %float %x_310 2
%380 = OpCompositeConstruct %v3float %377 %378 %379
%381 = OpVectorTimesScalar %v3float %380 %x_312
OpStore %param_3 %381 None
%x_317 = OpLoad %v4float %v_output1 None
%383 = OpCompositeExtract %float %x_317 0
%384 = OpCompositeExtract %float %x_317 1
%385 = OpCompositeExtract %float %x_317 2
%386 = OpCompositeConstruct %v3float %383 %384 %385
OpStore %param_4 %386 None
%x_320 = OpLoad %v2float %TBNUV None
OpStore %param_5 %x_320 None
%388 = OpAccessChain %_ptr_Uniform_v2float %19 %uint_0 %uint_8
%x_324 = OpLoad %v2float %388 None
OpStore %param_6 %x_324 None
%x_325 = OpFunctionCall %mat3v3float %cotangent_frame_vf3_vf3_vf2_vf2_ %param_3 %param_4 %param_5 %param_6
OpStore %TBN %x_325 None
%x_328 = OpLoad %mat3v3float %TBN None
OpStore %param_7 %x_328 None
%x_329 = OpFunctionCall %mat3v3float %transposeMat3_mf33_ %param_7
OpStore %invTBN %x_329 None
%x_331 = OpLoad %mat3v3float %invTBN None
%x_332 = OpLoad %v3float %output5 None
%397 = OpFNegate %v3float %x_332
%x_334 = OpMatrixTimesVector %v3float %x_331 %397
%x_337 = OpLoad %mat3v3float %invTBN None
%x_338 = OpLoad %v3float %output5 None
%401 = OpCompositeExtract %float %x_334 0
%402 = OpCompositeExtract %float %x_334 1
%403 = OpCompositeConstruct %v2float %401 %402
%404 = OpExtInst %float %83 Length %403
%405 = OpFNegate %v3float %x_338
%406 = OpMatrixTimesVector %v3float %x_337 %405
%407 = OpCompositeExtract %float %406 2
%408 = OpFDiv %float %404 %407
OpStore %parallaxLimit %408 None
%409 = OpAccessChain %_ptr_Uniform_float %19 %uint_0 %uint_5
%x_345 = OpLoad %float %409 None
%x_346 = OpLoad %float %parallaxLimit None
%413 = OpFMul %float %x_346 %x_345
OpStore %parallaxLimit %413 None
%x_349 = OpLoad %mat3v3float %invTBN None
%x_350 = OpLoad %v3float %output5 None
%416 = OpFNegate %v3float %x_350
%x_352 = OpMatrixTimesVector %v3float %x_349 %416
%418 = OpCompositeExtract %float %x_352 0
%419 = OpCompositeExtract %float %x_352 1
%420 = OpCompositeConstruct %v2float %418 %419
%421 = OpExtInst %v2float %83 Normalize %420
OpStore %vOffsetDir %421 None
%x_356 = OpLoad %v2float %vOffsetDir None
%x_357 = OpLoad %float %parallaxLimit None
%424 = OpVectorTimesScalar %v2float %x_356 %x_357
OpStore %vMaxOffset %424 None
%x_361 = OpLoad %mat3v3float %invTBN None
%x_362 = OpLoad %v3float %output5 None
%x_365 = OpLoad %mat3v3float %invTBN None
%x_366 = OpLoad %v4float %v_output2 None
%429 = OpFNegate %v3float %x_362
%430 = OpMatrixTimesVector %v3float %x_361 %429
%431 = OpCompositeExtract %float %x_366 0
%432 = OpCompositeExtract %float %x_366 1
%433 = OpCompositeExtract %float %x_366 2
%434 = OpCompositeConstruct %v3float %431 %432 %433
%435 = OpMatrixTimesVector %v3float %x_365 %434
%436 = OpDot %float %430 %435
%437 = OpFMul %float %436 %float_n11
%439 = OpFAdd %float %float_15 %437
OpStore %numSamples %439 None
%x_374 = OpLoad %float %numSamples None
%442 = OpFDiv %float %float_1 %x_374
OpStore %stepSize %442 None
OpStore %currRayHeight %float_1 None
OpStore %vCurrOffset %18 None
OpStore %vLastOffset %18 None
OpStore %lastSampledHeight %float_1 None
OpStore %currSampledHeight %float_1 None
OpStore %i %int_0 None
OpBranch %444
%444 = OpLabel
OpStore %tint_loop_idx %556
OpBranch %447
%447 = OpLabel
OpLoopMerge %448 %446 None
OpBranch %445
%445 = OpLabel
%558 = OpLoad %v2uint %tint_loop_idx None
%559 = OpIEqual %v2bool %558 %560
%562 = OpAll %bool %559
OpSelectionMerge %563 None
OpBranchConditional %562 %564 %563
%564 = OpLabel
OpBranch %448
%563 = OpLabel
%x_388 = OpLoad %int %i None
%566 = OpSLessThan %bool %x_388 %int_15
OpSelectionMerge %568 None
OpBranchConditional %566 %568 %569
%569 = OpLabel
OpBranch %448
%568 = OpLabel
%x_394 = OpLoad %v2float %v_uv None
%x_395 = OpLoad %v2float %vCurrOffset None
%572 = OpCompositeExtract %float %x_397 3
OpStore %currSampledHeight %572 None
%x_400 = OpLoad %float %currSampledHeight None
%x_401 = OpLoad %float %currRayHeight None
%575 = OpFOrdGreaterThan %bool %x_400 %x_401
OpSelectionMerge %576 None
OpBranchConditional %575 %577 %578
%577 = OpLabel
%x_406 = OpLoad %float %currSampledHeight None
%x_407 = OpLoad %float %currRayHeight None
%598 = OpFSub %float %x_406 %x_407
OpStore %delta1 %598 None
%x_410 = OpLoad %float %currRayHeight None
%x_411 = OpLoad %float %stepSize None
%x_413 = OpLoad %float %lastSampledHeight None
%602 = OpFAdd %float %x_410 %x_411
%603 = OpFSub %float %602 %x_413
OpStore %delta2 %603 None
%x_416 = OpLoad %float %delta1 None
%x_417 = OpLoad %float %delta1 None
%x_418 = OpLoad %float %delta2 None
%607 = OpFAdd %float %x_417 %x_418
%608 = OpFDiv %float %x_416 %607
OpStore %ratio %608 None
%x_421 = OpLoad %float %ratio None
%x_422 = OpLoad %v2float %vLastOffset None
%x_424 = OpLoad %float %ratio None
%x_426 = OpLoad %v2float %vCurrOffset None
%613 = OpVectorTimesScalar %v2float %x_422 %x_421
%614 = OpFSub %float %float_1 %x_424
%615 = OpVectorTimesScalar %v2float %x_426 %614
%616 = OpFAdd %v2float %613 %615
OpStore %vCurrOffset %616 None
OpBranch %448
%578 = OpLabel
%x_431 = OpLoad %float %stepSize None
%x_432 = OpLoad %float %currRayHeight None
%619 = OpFSub %float %x_432 %x_431
OpStore %currRayHeight %619 None
%x_434 = OpLoad %v2float %vCurrOffset None
OpStore %vLastOffset %x_434 None
%x_435 = OpLoad %float %stepSize None
%x_436 = OpLoad %v2float %vMaxOffset None
%x_438 = OpLoad %v2float %vCurrOffset None
%624 = OpVectorTimesScalar %v2float %x_436 %x_435
%625 = OpFAdd %v2float %x_438 %624
OpStore %vCurrOffset %625 None
%x_440 = OpLoad %float %currSampledHeight None
OpStore %lastSampledHeight %x_440 None
OpBranch %576
%576 = OpLabel
OpBranch %446
%446 = OpLabel
%579 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
%581 = OpLoad %uint %579 None
%tint_low_inc = OpISub %uint %581 %uint_1
%583 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
OpStore %583 %tint_low_inc None
%584 = OpIEqual %bool %tint_low_inc %uint_4294967295
%tint_carry = OpSelect %uint %584 %uint_1 %uint_0
%586 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
%587 = OpLoad %uint %586 None
%588 = OpISub %uint %587 %tint_carry
%589 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
OpStore %589 %588 None
%x_441 = OpLoad %int %i None
%591 = OpBitcast %uint %x_441
%592 = OpBitcast %uint %int_1
%594 = OpIAdd %uint %591 %592
%595 = OpBitcast %int %594
OpStore %i %595 None
OpBranch %447
%448 = OpLabel
%x_444 = OpLoad %v2float %vCurrOffset None
OpStore %parallaxOcclusion_0 %x_444 None
%x_445 = OpLoad %v2float %parallaxOcclusion_0 None
OpStore %uvOffset %x_445 None
%x_449 = OpLoad %v2float %v_uv None
%x_450 = OpLoad %v2float %uvOffset None
%453 = OpLoad %11 %TextureSamplerTexture None
%454 = OpLoad %14 %TextureSamplerSampler None
%455 = OpFAdd %v2float %x_449 %x_450
%456 = OpSampledImage %344 %453 %454
%x_452 = OpImageSampleImplicitLod %v4float %456 %455 None
%458 = OpAccessChain %_ptr_Uniform_float %19 %uint_0 %uint_2
%x_454 = OpLoad %float %458 None
%x_457 = OpLoad %mat3v3float %TBN None
OpStore %param_8 %x_457 None
%461 = OpCompositeExtract %float %x_452 0
%462 = OpCompositeExtract %float %x_452 1
%463 = OpCompositeExtract %float %x_452 2
%464 = OpCompositeConstruct %v3float %461 %462 %463
OpStore %param_9 %464 None
%465 = OpFDiv %float %float_1 %x_454
OpStore %param_10 %465 None
%x_461 = OpFunctionCall %v3float %perturbNormal_mf33_vf3_f1_ %param_8 %param_9 %param_10
%x_462 = OpLoad %v4float %output4 None
%468 = OpCompositeExtract %float %x_461 0
%469 = OpCompositeExtract %float %x_461 1
%470 = OpCompositeExtract %float %x_461 2
%471 = OpCompositeExtract %float %x_462 3
%472 = OpCompositeConstruct %v4float %468 %469 %470 %471
OpStore %output4 %472 None
%x_465 = OpLoad %v2float %v_uv None
%x_466 = OpLoad %v2float %uvOffset None
%475 = OpFAdd %v2float %x_465 %x_466
OpStore %output6 %475 None
%x_474 = OpLoad %v2float %output6 None
%477 = OpLoad %11 %TextureSampler1Texture None
%478 = OpLoad %14 %TextureSampler1Sampler None
%479 = OpSampledImage %344 %477 %478
%x_475 = OpImageSampleImplicitLod %v4float %479 %x_474 None
OpStore %tempTextureRead1 %x_475 None
%x_477 = OpLoad %v4float %tempTextureRead1 None
%482 = OpCompositeExtract %float %x_477 0
%483 = OpCompositeExtract %float %x_477 1
%484 = OpCompositeExtract %float %x_477 2
%485 = OpCompositeConstruct %v3float %482 %483 %484
OpStore %rgb1 %485 None
%486 = OpAccessChain %_ptr_Uniform_v3float %19 %uint_0 %uint_4
%x_481 = OpLoad %v3float %486 None
%x_482 = OpLoad %v4float %v_output1 None
%489 = OpCompositeExtract %float %x_482 0
%490 = OpCompositeExtract %float %x_482 1
%491 = OpCompositeExtract %float %x_482 2
%492 = OpCompositeConstruct %v3float %489 %490 %491
%493 = OpFSub %v3float %x_481 %492
%494 = OpExtInst %v3float %83 Normalize %493
OpStore %viewDirectionW_1 %494 None
OpStore %shadow %float_1 None
%x_488 = OpLoad %float %u_Float None
%496 = OpFMul %float %float_1 %x_488
OpStore %glossiness_1 %496 None
OpStore %diffuseBase %8 None
OpStore %specularBase %8 None
%x_494 = OpLoad %v4float %output4 None
%498 = OpCompositeExtract %float %x_494 0
%499 = OpCompositeExtract %float %x_494 1
%500 = OpCompositeExtract %float %x_494 2
%501 = OpCompositeConstruct %v3float %498 %499 %500
OpStore %normalW %501 None
%x_501 = OpLoad %v3float %viewDirectionW_1 None
OpStore %param_11 %x_501 None
%x_503 = OpLoad %v3float %normalW None
OpStore %param_12 %x_503 None
%504 = OpAccessChain %_ptr_Uniform_v4float %37 %uint_0 %uint_0
%x_507 = OpLoad %v4float %504 None
OpStore %param_13 %x_507 None
%507 = OpAccessChain %_ptr_Uniform_v4float %37 %uint_0 %uint_1
%x_510 = OpLoad %v4float %507 None
%509 = OpCompositeExtract %float %x_510 0
%510 = OpCompositeExtract %float %x_510 1
%511 = OpCompositeExtract %float %x_510 2
%512 = OpCompositeConstruct %v3float %509 %510 %511
OpStore %param_14 %512 None
%513 = OpAccessChain %_ptr_Uniform_v4float %37 %uint_0 %uint_2
%x_514 = OpLoad %v4float %513 None
%515 = OpCompositeExtract %float %x_514 0
%516 = OpCompositeExtract %float %x_514 1
%517 = OpCompositeExtract %float %x_514 2
%518 = OpCompositeConstruct %v3float %515 %516 %517
OpStore %param_15 %518 None
%519 = OpAccessChain %_ptr_Uniform_v3float %37 %uint_0 %uint_3
%x_518 = OpLoad %v3float %519 None
OpStore %param_16 %x_518 None
%x_520 = OpLoad %float %glossiness_1 None
OpStore %param_17 %x_520 None
%x_521 = 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 %x_521 None
OpStore %shadow %float_1 None
%524 = OpAccessChain %_ptr_Function_v3float %info %uint_0
%x_523 = OpLoad %v3float %524 None
%x_524 = OpLoad %float %shadow None
%x_526 = OpLoad %v3float %diffuseBase None
%528 = OpVectorTimesScalar %v3float %x_523 %x_524
%529 = OpFAdd %v3float %x_526 %528
OpStore %diffuseBase %529 None
%530 = OpAccessChain %_ptr_Function_v3float %info %uint_1
%x_529 = OpLoad %v3float %530 None
%x_530 = OpLoad %float %shadow None
%x_532 = OpLoad %v3float %specularBase None
%534 = OpVectorTimesScalar %v3float %x_529 %x_530
%535 = OpFAdd %v3float %x_532 %534
OpStore %specularBase %535 None
%x_535 = OpLoad %v3float %diffuseBase None
%x_536 = OpLoad %v3float %rgb1 None
%538 = OpFMul %v3float %x_535 %x_536
OpStore %diffuseOutput %538 None
%x_539 = OpLoad %v3float %specularBase None
%x_540 = OpLoad %v3float %u_Color None
%541 = OpFMul %v3float %x_539 %x_540
OpStore %specularOutput %541 None
%x_543 = OpLoad %v3float %diffuseOutput None
%x_544 = OpLoad %v3float %specularOutput None
%544 = OpFAdd %v3float %x_543 %x_544
OpStore %output3 %544 None
%x_548 = OpLoad %v3float %output3 None
%546 = OpCompositeExtract %float %x_548 0
%547 = OpCompositeExtract %float %x_548 1
%548 = OpCompositeExtract %float %x_548 2
%549 = OpCompositeConstruct %v4float %546 %547 %548 %float_1
OpStore %glFragColor %549 None
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %634
%vMainuv_param = OpFunctionParameter %v2float
%v_output1_param = OpFunctionParameter %v4float
%gl_FrontFacing_param = OpFunctionParameter %bool
%v_uv_param = OpFunctionParameter %v2float
%v_output2_param = OpFunctionParameter %v4float
%635 = OpLabel
OpStore %vMainuv %vMainuv_param None
OpStore %v_output1 %v_output1_param None
OpStore %gl_FrontFacing %gl_FrontFacing_param None
OpStore %v_uv %v_uv_param None
OpStore %v_output2 %v_output2_param None
%636 = OpFunctionCall %void %main_1
%637 = OpLoad %v4float %glFragColor None
%638 = OpCompositeConstruct %main_out %637
OpReturnValue %638
OpFunctionEnd
%main = OpFunction %void None %280
%640 = OpLabel
%641 = OpLoad %v2float %main_loc1_Input None
%642 = OpLoad %v4float %main_loc0_Input None
%643 = OpLoad %bool %main_front_facing_Input None
%644 = OpLoad %v2float %main_loc3_Input None
%645 = OpLoad %v4float %main_loc2_Input None
%646 = OpFunctionCall %main_out %main_inner %641 %642 %643 %644 %645
%647 = OpCompositeExtract %v4float %646 0
OpStore %main_loc0_Output %647 None
OpReturn
OpFunctionEnd