; SPIR-V ; Version: 1.6 ; Generator: Khronos Glslang Reference Front End; 11 ; Bound: 1908 ; Schema: 0 OpCapability Shader OpCapability RuntimeDescriptorArray OpExtension "SPV_KHR_non_semantic_info" %1 = OpExtInstImport "NonSemantic.Shader.DebugInfo.100" %11 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %main "main" %t_diffuse %g_sampler %inUV %ubo %t_normal %inTBN %t_specular %t_metallic %t_roughness %t_ao %t_emissive %t_depthshadowshadowSampler %outcolor %outnormal %_ %__0 %__1 %worldPosition %shadowSampler_0 %shadowMaps %viewPosition %gl_FragCoord %__2 %__3 %pointShadowMaps %__4 %clipSpaceZ OpExecutionMode %main OriginUpperLeft ; Debug Information %2 = OpString "" %3 = OpString "/Users/admin/Documents/RavEngine-Samples/RavEngine/cmake/../materials/pbr.fsh" %4 = OpString "/Users/admin/Documents/RavEngine-Samples/RavEngine/cmake/../materials/pbr_shared.glsl" %5 = OpString "/Users/admin/Documents/RavEngine-Samples/RavEngine/cmake/../shaders/BRDF.glsl" %6 = OpString "/Users/admin/Documents/RavEngine-Samples/RavEngine/cmake/../shaders/cluster_defs.h" %7 = OpString "/Users/admin/Documents/RavEngine-Samples/RavEngine/cmake/../shaders/cluster_shared.glsl" %8 = OpString "/Users/admin/Documents/RavEngine-Samples/RavEngine/cmake/../shaders/lit_mesh_shared.glsl" %9 = OpString "/Users/admin/Documents/RavEngine-Samples/RavEngine/cmake/../shaders/ravengine_shader.glsl" %10 = OpString "/Users/admin/Documents/RavEngine-Samples/RavEngine/tools/rvesc/mesh_shared.glsl" %16 = OpString "uint" %25 = OpString "float" %34 = OpString "color" %36 = OpString "layout(binding = 0) uniform sampler g_sampler; layout(binding = 1) uniform texture2D t_diffuse; layout(binding = 2) uniform texture2D t_normal; layout(binding = 3) uniform texture2D t_specular; layout(binding = 4) uniform texture2D t_metallic; layout(binding = 5) uniform texture2D t_roughness; layout(binding = 6) uniform texture2D t_ao; layout(binding = 7) uniform texture2D t_emissive; layout(location = 0) in vec2 inUV; layout(location = 1) in vec3[3] inTBN; LitOutput frag() { LitOutput mat_out; mat_out.color = texture(sampler2D(t_diffuse, g_sampler), inUV) * ubo.colorTint; vec3 normal = texture(sampler2D(t_normal, g_sampler), inUV).rgb; normal = normal * 2.0 - 1.0; mat3 TBN = mat3(inTBN[0],inTBN[1],inTBN[2]); mat_out.normal = normalize(TBN * normal); float specular = texture(sampler2D(t_specular, g_sampler), inUV).r; float metallic = texture(sampler2D(t_metallic, g_sampler), inUV).r; float roughness = texture(sampler2D(t_roughness, g_sampler), inUV).r; mat_out.ao = texture(sampler2D(t_ao, g_sampler), inUV).r; mat_out.roughness = roughness * ubo.roughnessTint; mat_out.specular = specular * ubo.specularTint; mat_out.metallic = metallic * ubo.metallicTint; mat_out.emissiveColor = texture(sampler2D(t_emissive, g_sampler), inUV).rgb; return mat_out; } " %39 = OpString "emissiveColor" %43 = OpString "ao" %50 = OpString "LitOutput" %60 = OpString "frag" %68 = OpString "bool" %75 = OpString "type.sampler" %77 = OpString " #define PI 3.1415926 vec4 ComputeClipSpacePosition(vec2 pos, float depth){ pos.y = 1.0 - pos.y; vec4 positionCS = vec4(pos * 2.0 - 1.0, depth, 1); return positionCS; } vec3 ComputeWorldSpacePos(vec2 positionNDC, float depth, mat4 invViewProj){ vec4 positionCS = ComputeClipSpacePosition(positionNDC, depth); vec4 hpositionWS = invViewProj * positionCS; return (hpositionWS / hpositionWS.w).xyz; } float pcfForShadow(vec3 pixelWorldPos, mat4 lightViewProj, sampler shadowSampler, texture2D t_depthshadow){ vec4 sampledPos = vec4(pixelWorldPos,1); sampledPos = lightViewProj * sampledPos; // where is this on the light sampledPos /= sampledPos.w; // perspective divide sampledPos.xy = sampledPos.xy * 0.5 + 0.5; // transform to [0,1] sampledPos.y = 1 - sampledPos.y; return texture(sampler2DShadow(t_depthshadow,shadowSampler), sampledPos.xyz, 0).x; }" %79 = OpString "@type.sampler" %85 = OpString "type.2d.image" %86 = OpString "@type.2d.image" %97 = OpString "pcfForShadow" %100 = OpString "pixelWorldPos" %106 = OpString "lightViewProj" %109 = OpString "shadowSampler" %112 = OpString "t_depthshadow" %123 = OpString "DistributionGGX" %126 = OpString " float DistributionGGX(vec3 N, vec3 H, float roughness) { float a = roughness*roughness; float a2 = a*a; float NdotH = max(dot(N, H), 0.0); float NdotH2 = NdotH*NdotH; float num = a2; float denom = (NdotH2 * (a2 - 1.0) + 1.0); denom = PI * denom * denom; return num / denom; } float GeometrySchlickGGX(float NdotV, float roughness) { float r = (roughness + 1.0); float k = (r*r) / 8.0; float num = NdotV; float denom = NdotV * (1.0 - k) + k; return num / denom; } float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness) { float NdotV = max(dot(N, V), 0.0); float NdotL = max(dot(N, L), 0.0); float ggx2 = GeometrySchlickGGX(NdotV, roughness); float ggx1 = GeometrySchlickGGX(NdotL, roughness); return ggx1 * ggx2; } vec3 fresnelSchlick(float cosTheta, vec3 F0) { return F0 + (1.0 - F0) * pow(clamp(1.0 - cosTheta, 0.0, 1.0), 5.0); } /** Parameters @param Normal: normal vector for this pixel @param camPos: location of the camera in world-space @param worldPos: world-space location of the pixel @param albedo: albedo color for the pixel @param metallic: metallic value for the pixel @param roughness: roughness value for the pixel @param L: normalized direction vector to the light @param attenuation: falloff - use 1.0 for directional lights, and ( 1.0 / (dist * dist)) for point sources, where dist is the distance from the light to the pixel @param lightColor: color of the light */ vec3 CalculateLightRadiance(vec3 Normal, vec3 camPos, vec3 WorldPos, vec3 albedo, float metallic, float roughness, vec3 L, float attenuation, vec3 lightColor){ vec3 N = normalize(Normal); vec3 V = normalize(camPos - WorldPos); vec3 F0 = vec3(0.04); F0 = mix(F0, albedo, metallic); // adapted from https://learnopengl.com/PBR/Lighting vec3 H = normalize(V + L); vec3 radiance = lightColor * attenuation; // cook-torrance brdf float NDF = DistributionGGX(N, H, roughness); float G = GeometrySmith(N, V, L, roughness); vec3 F = fresnelSchlick(max(dot(H, V), 0.0), F0); vec3 kS = F; vec3 kD = vec3(1.0) - kS; kD *= 1.0 - metallic; vec3 numerator = NDF * G * F; float denominator = 4.0 * max(dot(N, V), 0.0) * max(dot(N, L), 0.0) + 0.0001; vec3 specular = numerator / denominator; // add to outgoing radiance Lo float NdotL = max(dot(N, L), 0.0); vec3 Lo = (kD * albedo / PI + specular) * radiance * NdotL; return Lo; } " %128 = OpString "N" %133 = OpString "H" %136 = OpString "roughness" %144 = OpString "GeometrySchlickGGX" %147 = OpString "NdotV" %161 = OpString "GeometrySmith" %169 = OpString "V" %172 = OpString "L" %182 = OpString "fresnelSchlick" %186 = OpString "cosTheta" %191 = OpString "F0" %206 = OpString "CalculateLightRadiance" %210 = OpString "Normal" %215 = OpString "camPos" %218 = OpString "WorldPos" %221 = OpString "albedo" %224 = OpString "metallic" %232 = OpString "attenuation" %235 = OpString "lightColor" %243 = OpString "getLightAttenuation" %246 = OpString "#include \"cluster_defs.h\" struct Cluster { vec3 minPoint; vec3 maxPoint; uint pointLightCount; uint spotLightCount; uint pointLightIndices[CLUSTER_MAX_POINTS]; uint spotLightIndices[CLUSTER_MAX_SPOTS]; }; struct PointLight { vec3 position; vec3 color; float intensity; int castsShadows; uint shadowmapBindlessIndex; }; struct SpotLight{ mat4 lightViewProj; mat4 worldTransform; vec3 color; float intensity; float coneAngle; float penumbraAngle; int castsShadows; uint shadowmapBindlessIndex; }; float getPointLightRadius(float intensity){ // for quadratic falloff (influence = intensity / dist^2 ), the radius is equal to sqrt(intensity / min_influence) return sqrt(intensity / LIGHT_MIN_INFLUENCE); } float getLightAttenuation(float dist){ return 1 / (dist * dist); } " %249 = OpString "dist" %253 = OpString "main" %263 = OpString "mat_out" %268 = OpString "int" %273 = OpString "t_diffuse" %278 = OpString "g_sampler" %282 = OpString "type.sampled.image" %283 = OpString "@type.sampled.image" %291 = OpString "inUV" %296 = OpString "colorTint" %298 = OpString "specularTint" %302 = OpString "UniformBufferObject" %307 = OpString "ubo" %318 = OpString "normal" %324 = OpString "t_normal" %345 = OpString "TBN" %355 = OpString "inTBN" %389 = OpString "specular" %395 = OpString "t_specular" %409 = OpString "t_metallic" %422 = OpString "t_roughness" %432 = OpString "t_ao" %470 = OpString "t_emissive" %488 = OpString "sampledPos" %532 = OpString "t_depthshadowshadowSampler" %545 = OpString "a" %553 = OpString "a2" %561 = OpString "NdotH" %570 = OpString "NdotH2" %578 = OpString "num" %584 = OpString "denom" %608 = OpString "r" %615 = OpString "k" %657 = OpString "NdotL" %666 = OpString "ggx2" %676 = OpString "ggx1" %751 = OpString "radiance" %760 = OpString "NDF" %773 = OpString "G" %788 = OpString "F" %802 = OpString "kS" %809 = OpString "kD" %824 = OpString "numerator" %834 = OpString "denominator" %871 = OpString "Lo" %907 = OpString "user_out" %915 = OpString "outcolor" %921 = OpString "outnormal" %934 = OpString "i" %954 = OpString "projOnly" %958 = OpString "screenDimensions" %961 = OpString "gridSize" %963 = OpString "directionalLightCount" %966 = OpString "zFar" %969 = OpString "EngineData_Internal" %974 = OpString "engineConstants" %977 = OpString "lightAuxDataSSBO" %990 = OpString "intensity" %993 = OpString "AmbientLightData" %999 = OpString "light" %1011 = OpString "ambientLights" %1014 = OpString "ambientLightSSBO" %1076 = OpString "toLight" %1082 = OpString "shadowmapBindlessIndex" %1086 = OpString "DirectionalLightData" %1107 = OpString "dirLights" %1109 = OpString "dirLightSSBO" %1122 = OpString "lightResult" %1128 = OpString "worldPosition" %1162 = OpString "pcfFactor" %1185 = OpString "shadowMaps" %1218 = OpString "zTile" %1225 = OpString "viewPosition" %1255 = OpString "tileSize" %1275 = OpString "virtualScreenCoord" %1283 = OpString "gl_FragCoord" %1295 = OpString "tile" %1309 = OpString "tileIndex" %1332 = OpString "nPointLights" %1342 = OpString "maxPoint" %1345 = OpString "spotLightCount" %1348 = OpString "pointLightIndices" %1350 = OpString "spotLightIndices" %1352 = OpString "Cluster" %1357 = OpString "clusters" %1360 = OpString "clusterSSBO" %1390 = OpString "lightIndex" %1404 = OpString "castsShadows" %1407 = OpString "PointLight" %1426 = OpString "pointLights" %1429 = OpString "pointLightSSBO" %1461 = OpString "result" %1510 = OpString "shadowPos" %1521 = OpString "shadowDistance" %1529 = OpString "shadowDir" %1537 = OpString "projectedDistance" %1554 = OpString "nearClip" %1567 = OpString "b" %1574 = OpString "z" %1585 = OpString "dbDistance" %1594 = OpString "type.cube.image" %1596 = OpString "@type.cube.image" %1603 = OpString "pointShadowMaps" %1646 = OpString "nSpotLights" %1686 = OpString "worldTransform" %1690 = OpString "penumbraAngle" %1696 = OpString "SpotLight" %1718 = OpString "spotLights" %1720 = OpString "spotLightSSBO" %1733 = OpString "position" %1762 = OpString "coneDotFactor" %1772 = OpString "rotScaleOnly" %1787 = OpString "forward" %1798 = OpString "pixelAngle" %1907 = OpString "clipSpaceZ" OpSourceExtension "GL_EXT_nonuniform_qualifier" OpSourceExtension "GL_EXT_scalar_block_layout" OpSourceExtension "GL_GOOGLE_cpp_style_line_directive" OpSourceExtension "GL_GOOGLE_include_directive" OpName %main "main" ; id %22 OpName %LitOutput "LitOutput" ; id %32 OpMemberName %LitOutput 0 "color" OpMemberName %LitOutput 1 "normal" OpMemberName %LitOutput 2 "emissiveColor" OpMemberName %LitOutput 3 "roughness" OpMemberName %LitOutput 4 "specular" OpMemberName %LitOutput 5 "metallic" OpMemberName %LitOutput 6 "ao" OpName %frag_ "frag(" ; id %58 OpName %pcfForShadow_vf3_mf44_p1_t21_ "pcfForShadow(vf3;mf44;p1;t21;" ; id %95 OpName %pixelWorldPos "pixelWorldPos" ; id %91 OpName %lightViewProj "lightViewProj" ; id %92 OpName %shadowSampler "shadowSampler" ; id %93 OpName %t_depthshadow "t_depthshadow" ; id %94 OpName %DistributionGGX_vf3_vf3_f1_ "DistributionGGX(vf3;vf3;f1;" ; id %121 OpName %N "N" ; id %118 OpName %H "H" ; id %119 OpName %roughness "roughness" ; id %120 OpName %GeometrySchlickGGX_f1_f1_ "GeometrySchlickGGX(f1;f1;" ; id %142 OpName %NdotV "NdotV" ; id %140 OpName %roughness_0 "roughness" ; id %141 OpName %GeometrySmith_vf3_vf3_vf3_f1_ "GeometrySmith(vf3;vf3;vf3;f1;" ; id %159 OpName %N_0 "N" ; id %155 OpName %V "V" ; id %156 OpName %L "L" ; id %157 OpName %roughness_1 "roughness" ; id %158 OpName %fresnelSchlick_f1_vf3_ "fresnelSchlick(f1;vf3;" ; id %180 OpName %cosTheta "cosTheta" ; id %178 OpName %F0 "F0" ; id %179 OpName %CalculateLightRadiance_vf3_vf3_vf3_vf3_f1_f1_vf3_f1_vf3_ "CalculateLightRadiance(vf3;vf3;vf3;vf3;f1;f1;vf3;f1;vf3;" ; id %204 OpName %Normal "Normal" ; id %195 OpName %camPos "camPos" ; id %196 OpName %WorldPos "WorldPos" ; id %197 OpName %albedo "albedo" ; id %198 OpName %metallic "metallic" ; id %199 OpName %roughness_2 "roughness" ; id %200 OpName %L_0 "L" ; id %201 OpName %attenuation "attenuation" ; id %202 OpName %lightColor "lightColor" ; id %203 OpName %getLightAttenuation_f1_ "getLightAttenuation(f1;" ; id %241 OpName %dist "dist" ; id %240 OpName %mat_out "mat_out" ; id %261 OpName %t_diffuse "t_diffuse" ; id %271 OpName %g_sampler "g_sampler" ; id %276 OpName %inUV "inUV" ; id %289 OpName %UniformBufferObject "UniformBufferObject" ; id %294 OpMemberName %UniformBufferObject 0 "colorTint" OpMemberName %UniformBufferObject 1 "metallicTint" OpMemberName %UniformBufferObject 2 "roughnessTint" OpMemberName %UniformBufferObject 3 "specularTint" OpName %ubo "ubo" ; id %305 OpName %normal "normal" ; id %316 OpName %t_normal "t_normal" ; id %322 OpName %TBN "TBN" ; id %343 OpName %inTBN "inTBN" ; id %353 OpName %specular "specular" ; id %387 OpName %t_specular "t_specular" ; id %393 OpName %metallic_0 "metallic" ; id %402 OpName %t_metallic "t_metallic" ; id %407 OpName %roughness_3 "roughness" ; id %416 OpName %t_roughness "t_roughness" ; id %420 OpName %t_ao "t_ao" ; id %430 OpName %t_emissive "t_emissive" ; id %468 OpName %sampledPos "sampledPos" ; id %486 OpName %t_depthshadowshadowSampler "t_depthshadowshadowSampler" ; id %530 OpName %a "a" ; id %543 OpName %a2 "a2" ; id %551 OpName %NdotH "NdotH" ; id %559 OpName %NdotH2 "NdotH2" ; id %568 OpName %num "num" ; id %576 OpName %denom "denom" ; id %582 OpName %r "r" ; id %606 OpName %k "k" ; id %613 OpName %num_0 "num" ; id %623 OpName %denom_0 "denom" ; id %628 OpName %NdotV_0 "NdotV" ; id %646 OpName %NdotL "NdotL" ; id %655 OpName %ggx2 "ggx2" ; id %664 OpName %param "param" ; id %669 OpName %param_0 "param" ; id %671 OpName %ggx1 "ggx1" ; id %674 OpName %param_1 "param" ; id %679 OpName %param_2 "param" ; id %681 OpName %N_1 "N" ; id %710 OpName %V_0 "V" ; id %717 OpName %F0_0 "F0" ; id %726 OpName %H_0 "H" ; id %740 OpName %radiance "radiance" ; id %749 OpName %NDF "NDF" ; id %758 OpName %param_3 "param" ; id %764 OpName %param_4 "param" ; id %766 OpName %param_5 "param" ; id %768 OpName %G "G" ; id %771 OpName %param_6 "param" ; id %777 OpName %param_7 "param" ; id %779 OpName %param_8 "param" ; id %781 OpName %param_9 "param" ; id %783 OpName %F "F" ; id %786 OpName %param_10 "param" ; id %796 OpName %param_11 "param" ; id %797 OpName %kS "kS" ; id %800 OpName %kD "kD" ; id %807 OpName %numerator "numerator" ; id %822 OpName %denominator "denominator" ; id %832 OpName %specular_0 "specular" ; id %851 OpName %NdotL_0 "NdotL" ; id %860 OpName %Lo "Lo" ; id %869 OpName %user_out "user_out" ; id %905 OpName %outcolor "outcolor" ; id %913 OpName %outnormal "outnormal" ; id %919 OpName %i "i" ; id %932 OpName %EngineData_Internal "EngineData_Internal" ; id %952 OpMemberName %EngineData_Internal 0 "viewProj" OpMemberName %EngineData_Internal 1 "viewOnly" OpMemberName %EngineData_Internal 2 "projOnly" OpMemberName %EngineData_Internal 3 "screenDimensions" OpMemberName %EngineData_Internal 4 "camPos" OpMemberName %EngineData_Internal 5 "gridSize" OpMemberName %EngineData_Internal 6 "ambientLightCount" OpMemberName %EngineData_Internal 7 "directionalLightCount" OpMemberName %EngineData_Internal 8 "zNear" OpMemberName %EngineData_Internal 9 "zFar" OpName %lightAuxDataSSBO "lightAuxDataSSBO" ; id %972 OpMemberName %lightAuxDataSSBO 0 "engineConstants" OpName %_ "" ; id %980 OpName %AmbientLightData "AmbientLightData" ; id %987 OpMemberName %AmbientLightData 0 "color" OpMemberName %AmbientLightData 1 "intensity" OpName %light "light" ; id %997 OpName %AmbientLightData_0 "AmbientLightData" ; id %1003 OpMemberName %AmbientLightData_0 0 "color" OpMemberName %AmbientLightData_0 1 "intensity" OpName %ambientLightSSBO "ambientLightSSBO" ; id %1009 OpMemberName %ambientLightSSBO 0 "ambientLights" OpName %__0 "" ; id %1017 OpName %ao "ao" ; id %1025 OpName %i_0 "i" ; id %1052 OpName %DirectionalLightData "DirectionalLightData" ; id %1072 OpMemberName %DirectionalLightData 0 "lightViewProj" OpMemberName %DirectionalLightData 1 "color" OpMemberName %DirectionalLightData 2 "toLight" OpMemberName %DirectionalLightData 3 "intensity" OpMemberName %DirectionalLightData 4 "castsShadows" OpMemberName %DirectionalLightData 5 "shadowmapBindlessIndex" OpName %light_0 "light" ; id %1090 OpName %DirectionalLightData_0 "DirectionalLightData" ; id %1095 OpMemberName %DirectionalLightData_0 0 "lightViewProj" OpMemberName %DirectionalLightData_0 1 "color" OpMemberName %DirectionalLightData_0 2 "toLight" OpMemberName %DirectionalLightData_0 3 "intensity" OpMemberName %DirectionalLightData_0 4 "castsShadows" OpMemberName %DirectionalLightData_0 5 "shadowmapBindlessIndex" OpName %dirLightSSBO "dirLightSSBO" ; id %1105 OpMemberName %dirLightSSBO 0 "dirLights" OpName %__1 "" ; id %1112 OpName %lightResult "lightResult" ; id %1120 OpName %worldPosition "worldPosition" ; id %1126 OpName %param_12 "param" ; id %1134 OpName %param_13 "param" ; id %1137 OpName %param_14 "param" ; id %1142 OpName %param_15 "param" ; id %1144 OpName %param_16 "param" ; id %1148 OpName %param_17 "param" ; id %1151 OpName %param_18 "param" ; id %1154 OpName %param_19 "param" ; id %1157 OpName %param_20 "param" ; id %1158 OpName %pcfFactor "pcfFactor" ; id %1160 OpName %shadowSampler_0 "shadowSampler" ; id %1177 OpName %shadowMaps "shadowMaps" ; id %1183 OpName %param_21 "param" ; id %1190 OpName %param_22 "param" ; id %1192 OpName %zTile "zTile" ; id %1216 OpName %viewPosition "viewPosition" ; id %1223 OpName %tileSize "tileSize" ; id %1253 OpName %virtualScreenCoord "virtualScreenCoord" ; id %1273 OpName %gl_FragCoord "gl_FragCoord" ; id %1281 OpName %tile "tile" ; id %1293 OpName %tileIndex "tileIndex" ; id %1307 OpName %nPointLights "nPointLights" ; id %1330 OpName %Cluster "Cluster" ; id %1340 OpMemberName %Cluster 0 "minPoint" OpMemberName %Cluster 1 "maxPoint" OpMemberName %Cluster 2 "pointLightCount" OpMemberName %Cluster 3 "spotLightCount" OpMemberName %Cluster 4 "pointLightIndices" OpMemberName %Cluster 5 "spotLightIndices" OpName %clusterSSBO "clusterSSBO" ; id %1355 OpMemberName %clusterSSBO 0 "clusters" OpName %__2 "" ; id %1363 OpName %i_1 "i" ; id %1368 OpName %lightIndex "lightIndex" ; id %1388 OpName %PointLight "PointLight" ; id %1399 OpMemberName %PointLight 0 "position" OpMemberName %PointLight 1 "color" OpMemberName %PointLight 2 "intensity" OpMemberName %PointLight 3 "castsShadows" OpMemberName %PointLight 4 "shadowmapBindlessIndex" OpName %light_1 "light" ; id %1411 OpName %PointLight_0 "PointLight" ; id %1415 OpMemberName %PointLight_0 0 "position" OpMemberName %PointLight_0 1 "color" OpMemberName %PointLight_0 2 "intensity" OpMemberName %PointLight_0 3 "castsShadows" OpMemberName %PointLight_0 4 "shadowmapBindlessIndex" OpName %pointLightSSBO "pointLightSSBO" ; id %1424 OpMemberName %pointLightSSBO 0 "pointLights" OpName %__3 "" ; id %1432 OpName %toLight "toLight" ; id %1440 OpName %dist_0 "dist" ; id %1450 OpName %result "result" ; id %1459 OpName %param_23 "param" ; id %1465 OpName %param_24 "param" ; id %1473 OpName %param_25 "param" ; id %1476 OpName %param_26 "param" ; id %1479 OpName %param_27 "param" ; id %1481 OpName %param_28 "param" ; id %1485 OpName %param_29 "param" ; id %1488 OpName %param_30 "param" ; id %1491 OpName %param_31 "param" ; id %1493 OpName %param_32 "param" ; id %1494 OpName %pcfFactor_0 "pcfFactor" ; id %1496 OpName %shadowPos "shadowPos" ; id %1508 OpName %shadowDistance "shadowDistance" ; id %1519 OpName %shadowDir "shadowDir" ; id %1527 OpName %projectedDistance "projectedDistance" ; id %1535 OpName %nearClip "nearClip" ; id %1552 OpName %a_0 "a" ; id %1560 OpName %b "b" ; id %1565 OpName %z "z" ; id %1572 OpName %dbDistance "dbDistance" ; id %1583 OpName %pointShadowMaps "pointShadowMaps" ; id %1601 OpName %nSpotLights "nSpotLights" ; id %1644 OpName %i_2 "i" ; id %1654 OpName %lightIndex_0 "lightIndex" ; id %1674 OpName %SpotLight "SpotLight" ; id %1684 OpMemberName %SpotLight 0 "lightViewProj" OpMemberName %SpotLight 1 "worldTransform" OpMemberName %SpotLight 2 "color" OpMemberName %SpotLight 3 "intensity" OpMemberName %SpotLight 4 "coneAngle" OpMemberName %SpotLight 5 "penumbraAngle" OpMemberName %SpotLight 6 "castsShadows" OpMemberName %SpotLight 7 "shadowmapBindlessIndex" OpName %light_2 "light" ; id %1700 OpName %SpotLight_0 "SpotLight" ; id %1704 OpMemberName %SpotLight_0 0 "lightViewProj" OpMemberName %SpotLight_0 1 "worldTransform" OpMemberName %SpotLight_0 2 "color" OpMemberName %SpotLight_0 3 "intensity" OpMemberName %SpotLight_0 4 "coneAngle" OpMemberName %SpotLight_0 5 "penumbraAngle" OpMemberName %SpotLight_0 6 "castsShadows" OpMemberName %SpotLight_0 7 "shadowmapBindlessIndex" OpName %spotLightSSBO "spotLightSSBO" ; id %1716 OpMemberName %spotLightSSBO 0 "spotLights" OpName %__4 "" ; id %1723 OpName %position "position" ; id %1731 OpName %toLight_0 "toLight" ; id %1741 OpName %dist_1 "dist" ; id %1751 OpName %coneDotFactor "coneDotFactor" ; id %1760 OpName %rotScaleOnly "rotScaleOnly" ; id %1770 OpName %forward "forward" ; id %1785 OpName %pixelAngle "pixelAngle" ; id %1796 OpName %result_0 "result" ; id %1806 OpName %param_33 "param" ; id %1811 OpName %param_34 "param" ; id %1819 OpName %param_35 "param" ; id %1822 OpName %param_36 "param" ; id %1825 OpName %param_37 "param" ; id %1827 OpName %param_38 "param" ; id %1831 OpName %param_39 "param" ; id %1834 OpName %param_40 "param" ; id %1837 OpName %param_41 "param" ; id %1839 OpName %param_42 "param" ; id %1840 OpName %pcfFactor_1 "pcfFactor" ; id %1842 OpName %param_43 "param" ; id %1859 OpName %param_44 "param" ; id %1861 OpName %clipSpaceZ "clipSpaceZ" ; id %1905 OpModuleProcessed "auto-map-bindings" OpModuleProcessed "shift-texture-binding 16" OpModuleProcessed "shift-sampler-binding 16" OpModuleProcessed "shift-image-binding 16" OpModuleProcessed "client vulkan100" OpModuleProcessed "target-env spirv1.6" OpModuleProcessed "target-env vulkan1.3" OpModuleProcessed "entry-point main" OpModuleProcessed "client vulkan100" OpModuleProcessed "target-env spirv1.6" OpModuleProcessed "target-env vulkan1.3" OpModuleProcessed "entry-point main" ; Annotations OpDecorate %t_diffuse Binding 1 OpDecorate %t_diffuse DescriptorSet 0 OpDecorate %g_sampler Binding 0 OpDecorate %g_sampler DescriptorSet 0 OpDecorate %inUV Location 0 OpDecorate %UniformBufferObject Block OpMemberDecorate %UniformBufferObject 0 Offset 0 OpMemberDecorate %UniformBufferObject 1 Offset 16 OpMemberDecorate %UniformBufferObject 2 Offset 20 OpMemberDecorate %UniformBufferObject 3 Offset 24 OpDecorate %t_normal Binding 2 OpDecorate %t_normal DescriptorSet 0 OpDecorate %inTBN Location 1 OpDecorate %t_specular Binding 3 OpDecorate %t_specular DescriptorSet 0 OpDecorate %t_metallic Binding 4 OpDecorate %t_metallic DescriptorSet 0 OpDecorate %t_roughness Binding 5 OpDecorate %t_roughness DescriptorSet 0 OpDecorate %t_ao Binding 6 OpDecorate %t_ao DescriptorSet 0 OpDecorate %t_emissive Binding 7 OpDecorate %t_emissive DescriptorSet 0 OpDecorate %outcolor Location 0 OpDecorate %outnormal Location 1 OpMemberDecorate %EngineData_Internal 0 ColMajor OpMemberDecorate %EngineData_Internal 0 MatrixStride 16 OpMemberDecorate %EngineData_Internal 0 Offset 0 OpMemberDecorate %EngineData_Internal 1 ColMajor OpMemberDecorate %EngineData_Internal 1 MatrixStride 16 OpMemberDecorate %EngineData_Internal 1 Offset 64 OpMemberDecorate %EngineData_Internal 2 ColMajor OpMemberDecorate %EngineData_Internal 2 MatrixStride 16 OpMemberDecorate %EngineData_Internal 2 Offset 128 OpMemberDecorate %EngineData_Internal 3 Offset 192 OpMemberDecorate %EngineData_Internal 4 Offset 208 OpMemberDecorate %EngineData_Internal 5 Offset 220 OpMemberDecorate %EngineData_Internal 6 Offset 232 OpMemberDecorate %EngineData_Internal 7 Offset 236 OpMemberDecorate %EngineData_Internal 8 Offset 240 OpMemberDecorate %EngineData_Internal 9 Offset 244 OpDecorate %_runtimearr_EngineData_Internal ArrayStride 248 OpDecorate %lightAuxDataSSBO Block OpMemberDecorate %lightAuxDataSSBO 0 NonWritable OpMemberDecorate %lightAuxDataSSBO 0 Offset 0 OpDecorate %_ NonWritable OpDecorate %_ Binding 11 OpDecorate %_ DescriptorSet 0 OpMemberDecorate %AmbientLightData_0 0 Offset 0 OpMemberDecorate %AmbientLightData_0 1 Offset 12 OpDecorate %_runtimearr_AmbientLightData_0 ArrayStride 16 OpDecorate %ambientLightSSBO Block OpMemberDecorate %ambientLightSSBO 0 NonWritable OpMemberDecorate %ambientLightSSBO 0 Offset 0 OpDecorate %__0 NonWritable OpDecorate %__0 Binding 12 OpDecorate %__0 DescriptorSet 0 OpMemberDecorate %DirectionalLightData_0 0 ColMajor OpMemberDecorate %DirectionalLightData_0 0 MatrixStride 16 OpMemberDecorate %DirectionalLightData_0 0 Offset 0 OpMemberDecorate %DirectionalLightData_0 1 Offset 64 OpMemberDecorate %DirectionalLightData_0 2 Offset 76 OpMemberDecorate %DirectionalLightData_0 3 Offset 88 OpMemberDecorate %DirectionalLightData_0 4 Offset 92 OpMemberDecorate %DirectionalLightData_0 5 Offset 96 OpDecorate %_runtimearr_DirectionalLightData_0 ArrayStride 100 OpDecorate %dirLightSSBO Block OpMemberDecorate %dirLightSSBO 0 NonWritable OpMemberDecorate %dirLightSSBO 0 Offset 0 OpDecorate %__1 NonWritable OpDecorate %__1 Binding 13 OpDecorate %__1 DescriptorSet 0 OpDecorate %worldPosition Location 11 OpDecorate %shadowSampler_0 Binding 14 OpDecorate %shadowSampler_0 DescriptorSet 0 OpDecorate %shadowMaps Binding 0 OpDecorate %shadowMaps DescriptorSet 1 OpDecorate %viewPosition Location 12 OpDecorate %gl_FragCoord BuiltIn FragCoord OpDecorate %_arr_uint_uint_16 ArrayStride 4 OpDecorate %_arr_uint_uint_16_0 ArrayStride 4 OpMemberDecorate %Cluster 0 Offset 0 OpMemberDecorate %Cluster 1 Offset 12 OpMemberDecorate %Cluster 2 Offset 24 OpMemberDecorate %Cluster 3 Offset 28 OpMemberDecorate %Cluster 4 Offset 32 OpMemberDecorate %Cluster 5 Offset 96 OpDecorate %_runtimearr_Cluster ArrayStride 160 OpDecorate %clusterSSBO Block OpMemberDecorate %clusterSSBO 0 NonWritable OpMemberDecorate %clusterSSBO 0 Offset 0 OpDecorate %__2 NonWritable OpDecorate %__2 Binding 16 OpDecorate %__2 DescriptorSet 0 OpMemberDecorate %PointLight_0 0 Offset 0 OpMemberDecorate %PointLight_0 1 Offset 12 OpMemberDecorate %PointLight_0 2 Offset 24 OpMemberDecorate %PointLight_0 3 Offset 28 OpMemberDecorate %PointLight_0 4 Offset 32 OpDecorate %_runtimearr_PointLight_0 ArrayStride 36 OpDecorate %pointLightSSBO Block OpMemberDecorate %pointLightSSBO 0 NonWritable OpMemberDecorate %pointLightSSBO 0 Offset 0 OpDecorate %__3 NonWritable OpDecorate %__3 Binding 15 OpDecorate %__3 DescriptorSet 0 OpDecorate %pointShadowMaps Binding 0 OpDecorate %pointShadowMaps DescriptorSet 2 OpMemberDecorate %SpotLight_0 0 ColMajor OpMemberDecorate %SpotLight_0 0 MatrixStride 16 OpMemberDecorate %SpotLight_0 0 Offset 0 OpMemberDecorate %SpotLight_0 1 ColMajor OpMemberDecorate %SpotLight_0 1 MatrixStride 16 OpMemberDecorate %SpotLight_0 1 Offset 64 OpMemberDecorate %SpotLight_0 2 Offset 128 OpMemberDecorate %SpotLight_0 3 Offset 140 OpMemberDecorate %SpotLight_0 4 Offset 144 OpMemberDecorate %SpotLight_0 5 Offset 148 OpMemberDecorate %SpotLight_0 6 Offset 152 OpMemberDecorate %SpotLight_0 7 Offset 156 OpDecorate %_runtimearr_SpotLight_0 ArrayStride 160 OpDecorate %spotLightSSBO Block OpMemberDecorate %spotLightSSBO 0 NonWritable OpMemberDecorate %spotLightSSBO 0 Offset 0 OpDecorate %__4 NonWritable OpDecorate %__4 Binding 17 OpDecorate %__4 DescriptorSet 0 OpDecorate %clipSpaceZ Location 13 ; Types, variables and constants %void = OpTypeVoid %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_32 = OpConstant %uint 32 %uint_6 = OpConstant %uint 6 %uint_0 = OpConstant %uint 0 %17 = OpExtInst %void %1 DebugTypeBasic %16 %uint_32 %uint_6 %uint_0 %uint_3 = OpConstant %uint 3 %14 = OpExtInst %void %1 DebugTypeFunction %uint_3 %void %float = OpTypeFloat 32 %26 = OpExtInst %void %1 DebugTypeBasic %25 %uint_32 %uint_3 %uint_0 %v4float = OpTypeVector %float 4 %uint_4 = OpConstant %uint 4 %29 = OpExtInst %void %1 DebugTypeVector %26 %uint_4 %v3float = OpTypeVector %float 3 %31 = OpExtInst %void %1 DebugTypeVector %26 %uint_3 %LitOutput = OpTypeStruct %v4float %v3float %v3float %float %float %float %float %35 = OpExtInst %void %1 DebugSource %4 %36 %uint_10 = OpConstant %uint 10 %33 = OpExtInst %void %1 DebugTypeMember %34 %29 %35 %uint_6 %uint_10 %uint_0 %uint_0 %uint_3 %uint_8 = OpConstant %uint 8 %38 = OpExtInst %void %1 DebugTypeMember %39 %31 %35 %uint_8 %uint_10 %uint_0 %uint_0 %uint_3 %41 = OpExtInst %void %1 DebugTypeMember %39 %31 %35 %uint_8 %uint_10 %uint_0 %uint_0 %uint_3 %uint_12 = OpConstant %uint 12 %uint_11 = OpConstant %uint 11 %42 = OpExtInst %void %1 DebugTypeMember %43 %26 %35 %uint_12 %uint_11 %uint_0 %uint_0 %uint_3 %46 = OpExtInst %void %1 DebugTypeMember %43 %26 %35 %uint_12 %uint_11 %uint_0 %uint_0 %uint_3 %47 = OpExtInst %void %1 DebugTypeMember %43 %26 %35 %uint_12 %uint_11 %uint_0 %uint_0 %uint_3 %48 = OpExtInst %void %1 DebugTypeMember %43 %26 %35 %uint_12 %uint_11 %uint_0 %uint_0 %uint_3 %uint_1 = OpConstant %uint 1 %uint_13 = OpConstant %uint 13 %54 = OpExtInst %void %1 DebugSource %2 %2 %uint_2 = OpConstant %uint 2 %53 = OpExtInst %void %1 DebugCompilationUnit %uint_1 %uint_4 %54 %uint_2 %49 = OpExtInst %void %1 DebugTypeComposite %50 %uint_1 %35 %uint_13 %uint_0 %53 %50 %uint_0 %uint_3 %33 %38 %41 %42 %46 %47 %48 %56 = OpTypeFunction %LitOutput %57 = OpExtInst %void %1 DebugTypeFunction %uint_3 %49 %61 = OpExtInst %void %1 DebugFunction %60 %57 %35 %uint_13 %uint_0 %53 %60 %uint_3 %uint_13 %_ptr_Function_v3float = OpTypePointer Function %v3float %uint_7 = OpConstant %uint 7 %64 = OpExtInst %void %1 DebugTypePointer %31 %uint_7 %uint_0 %mat4v4float = OpTypeMatrix %v4float 4 %bool = OpTypeBool %69 = OpExtInst %void %1 DebugTypeBasic %68 %uint_32 %uint_2 %uint_0 %true = OpConstantTrue %bool %66 = OpExtInst %void %1 DebugTypeMatrix %29 %uint_4 %true %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float %72 = OpExtInst %void %1 DebugTypePointer %66 %uint_7 %uint_0 %73 = OpTypeSampler %76 = OpExtInst %void %1 DebugSource %9 %77 %uint_16 = OpConstant %uint 16 %80 = OpExtInst %void %1 DebugInfoNone %74 = OpExtInst %void %1 DebugTypeComposite %75 %uint_1 %76 %uint_16 %uint_0 %53 %79 %80 %uint_3 %_ptr_UniformConstant_73 = OpTypePointer UniformConstant %73 %82 = OpExtInst %void %1 DebugTypePointer %74 %uint_0 %uint_0 %83 = OpTypeImage %float 2D 0 0 0 1 Unknown %84 = OpExtInst %void %1 DebugTypeComposite %85 %uint_0 %76 %uint_16 %uint_0 %53 %86 %80 %uint_3 %_ptr_UniformConstant_83 = OpTypePointer UniformConstant %83 %88 = OpExtInst %void %1 DebugTypePointer %84 %uint_0 %uint_0 %89 = OpTypeFunction %float %_ptr_Function_v3float %_ptr_Function_mat4v4float %_ptr_UniformConstant_73 %_ptr_UniformConstant_83 %90 = OpExtInst %void %1 DebugTypeFunction %uint_3 %26 %31 %66 %74 %84 %98 = OpExtInst %void %1 DebugFunction %97 %90 %76 %uint_16 %uint_0 %53 %97 %uint_3 %uint_16 %99 = OpExtInst %void %1 DebugLocalVariable %100 %31 %76 %uint_16 %uint_0 %98 %uint_4 %uint_1 %102 = OpExtInst %void %1 DebugExpression %105 = OpExtInst %void %1 DebugLocalVariable %106 %66 %76 %uint_16 %uint_0 %98 %uint_4 %uint_2 %108 = OpExtInst %void %1 DebugLocalVariable %109 %74 %76 %uint_16 %uint_0 %98 %uint_4 %uint_3 %111 = OpExtInst %void %1 DebugLocalVariable %112 %84 %76 %uint_16 %uint_0 %98 %uint_4 %uint_4 %_ptr_Function_float = OpTypePointer Function %float %115 = OpExtInst %void %1 DebugTypePointer %26 %uint_7 %uint_0 %116 = OpTypeFunction %float %_ptr_Function_v3float %_ptr_Function_v3float %_ptr_Function_float %117 = OpExtInst %void %1 DebugTypeFunction %uint_3 %26 %31 %31 %26 %125 = OpExtInst %void %1 DebugSource %5 %126 %124 = OpExtInst %void %1 DebugFunction %123 %117 %125 %uint_2 %uint_0 %53 %123 %uint_3 %uint_2 %127 = OpExtInst %void %1 DebugLocalVariable %128 %31 %125 %uint_2 %uint_0 %124 %uint_4 %uint_1 %132 = OpExtInst %void %1 DebugLocalVariable %133 %31 %125 %uint_2 %uint_0 %124 %uint_4 %uint_2 %135 = OpExtInst %void %1 DebugLocalVariable %136 %26 %125 %uint_2 %uint_0 %124 %uint_4 %uint_3 %138 = OpTypeFunction %float %_ptr_Function_float %_ptr_Function_float %139 = OpExtInst %void %1 DebugTypeFunction %uint_3 %26 %26 %26 %145 = OpExtInst %void %1 DebugFunction %144 %139 %125 %uint_16 %uint_0 %53 %144 %uint_3 %uint_16 %146 = OpExtInst %void %1 DebugLocalVariable %147 %26 %125 %uint_16 %uint_0 %145 %uint_4 %uint_1 %151 = OpExtInst %void %1 DebugLocalVariable %136 %26 %125 %uint_16 %uint_0 %145 %uint_4 %uint_2 %153 = OpTypeFunction %float %_ptr_Function_v3float %_ptr_Function_v3float %_ptr_Function_v3float %_ptr_Function_float %154 = OpExtInst %void %1 DebugTypeFunction %uint_3 %26 %31 %31 %31 %26 %uint_26 = OpConstant %uint 26 %162 = OpExtInst %void %1 DebugFunction %161 %154 %125 %uint_26 %uint_0 %53 %161 %uint_3 %uint_26 %164 = OpExtInst %void %1 DebugLocalVariable %128 %31 %125 %uint_26 %uint_0 %162 %uint_4 %uint_1 %168 = OpExtInst %void %1 DebugLocalVariable %169 %31 %125 %uint_26 %uint_0 %162 %uint_4 %uint_2 %171 = OpExtInst %void %1 DebugLocalVariable %172 %31 %125 %uint_26 %uint_0 %162 %uint_4 %uint_3 %174 = OpExtInst %void %1 DebugLocalVariable %136 %26 %125 %uint_26 %uint_0 %162 %uint_4 %uint_4 %176 = OpTypeFunction %v3float %_ptr_Function_float %_ptr_Function_v3float %177 = OpExtInst %void %1 DebugTypeFunction %uint_3 %31 %26 %31 %uint_36 = OpConstant %uint 36 %183 = OpExtInst %void %1 DebugFunction %182 %177 %125 %uint_36 %uint_0 %53 %182 %uint_3 %uint_36 %185 = OpExtInst %void %1 DebugLocalVariable %186 %26 %125 %uint_36 %uint_0 %183 %uint_4 %uint_1 %190 = OpExtInst %void %1 DebugLocalVariable %191 %31 %125 %uint_36 %uint_0 %183 %uint_4 %uint_2 %193 = OpTypeFunction %v3float %_ptr_Function_v3float %_ptr_Function_v3float %_ptr_Function_v3float %_ptr_Function_v3float %_ptr_Function_float %_ptr_Function_float %_ptr_Function_v3float %_ptr_Function_float %_ptr_Function_v3float %194 = OpExtInst %void %1 DebugTypeFunction %uint_3 %31 %31 %31 %31 %31 %26 %26 %31 %26 %31 %uint_52 = OpConstant %uint 52 %207 = OpExtInst %void %1 DebugFunction %206 %194 %125 %uint_52 %uint_0 %53 %206 %uint_3 %uint_52 %209 = OpExtInst %void %1 DebugLocalVariable %210 %31 %125 %uint_52 %uint_0 %207 %uint_4 %uint_1 %214 = OpExtInst %void %1 DebugLocalVariable %215 %31 %125 %uint_52 %uint_0 %207 %uint_4 %uint_2 %217 = OpExtInst %void %1 DebugLocalVariable %218 %31 %125 %uint_52 %uint_0 %207 %uint_4 %uint_3 %220 = OpExtInst %void %1 DebugLocalVariable %221 %31 %125 %uint_52 %uint_0 %207 %uint_4 %uint_4 %uint_5 = OpConstant %uint 5 %223 = OpExtInst %void %1 DebugLocalVariable %224 %26 %125 %uint_52 %uint_0 %207 %uint_4 %uint_5 %227 = OpExtInst %void %1 DebugLocalVariable %136 %26 %125 %uint_52 %uint_0 %207 %uint_4 %uint_6 %229 = OpExtInst %void %1 DebugLocalVariable %172 %31 %125 %uint_52 %uint_0 %207 %uint_4 %uint_7 %231 = OpExtInst %void %1 DebugLocalVariable %232 %26 %125 %uint_52 %uint_0 %207 %uint_4 %uint_8 %uint_9 = OpConstant %uint 9 %234 = OpExtInst %void %1 DebugLocalVariable %235 %31 %125 %uint_52 %uint_0 %207 %uint_4 %uint_9 %238 = OpTypeFunction %float %_ptr_Function_float %239 = OpExtInst %void %1 DebugTypeFunction %uint_3 %26 %26 %245 = OpExtInst %void %1 DebugSource %7 %246 %uint_40 = OpConstant %uint 40 %244 = OpExtInst %void %1 DebugFunction %243 %239 %245 %uint_40 %uint_0 %53 %243 %uint_3 %uint_40 %248 = OpExtInst %void %1 DebugLocalVariable %249 %26 %245 %uint_40 %uint_0 %244 %uint_4 %uint_1 %uint_72 = OpConstant %uint 72 %254 = OpExtInst %void %1 DebugFunction %253 %14 %245 %uint_72 %uint_0 %53 %253 %uint_3 %uint_72 %_ptr_Function_LitOutput = OpTypePointer Function %LitOutput %260 = OpExtInst %void %1 DebugTypePointer %49 %uint_7 %uint_0 %uint_17 = OpConstant %uint 17 %262 = OpExtInst %void %1 DebugLocalVariable %263 %49 %35 %uint_17 %uint_0 %61 %uint_4 %int = OpTypeInt 32 1 %269 = OpExtInst %void %1 DebugTypeBasic %268 %uint_32 %uint_4 %uint_0 %int_0 = OpConstant %int 0 %t_diffuse = OpVariable %_ptr_UniformConstant_83 UniformConstant %272 = OpExtInst %void %1 DebugGlobalVariable %273 %84 %35 %uint_17 %uint_0 %53 %273 %t_diffuse %uint_8 %275 = OpExtInst %void %1 DebugTypeComposite %75 %uint_1 %35 %uint_17 %uint_0 %53 %79 %80 %uint_3 %g_sampler = OpVariable %_ptr_UniformConstant_73 UniformConstant %277 = OpExtInst %void %1 DebugGlobalVariable %278 %275 %35 %uint_17 %uint_0 %53 %278 %g_sampler %uint_8 %280 = OpTypeSampledImage %83 %281 = OpExtInst %void %1 DebugTypeComposite %282 %uint_0 %35 %uint_17 %uint_0 %53 %283 %80 %uint_3 %v2float = OpTypeVector %float 2 %286 = OpExtInst %void %1 DebugTypeVector %26 %uint_2 %_ptr_Input_v2float = OpTypePointer Input %v2float %288 = OpExtInst %void %1 DebugTypePointer %286 %uint_1 %uint_0 %inUV = OpVariable %_ptr_Input_v2float Input %290 = OpExtInst %void %1 DebugGlobalVariable %291 %286 %35 %uint_17 %uint_0 %53 %291 %inUV %uint_8 %UniformBufferObject = OpTypeStruct %v4float %float %float %float %295 = OpExtInst %void %1 DebugTypeMember %296 %29 %35 %uint_3 %uint_7 %uint_0 %uint_0 %uint_3 %297 = OpExtInst %void %1 DebugTypeMember %298 %26 %35 %uint_6 %uint_8 %uint_0 %uint_0 %uint_3 %299 = OpExtInst %void %1 DebugTypeMember %298 %26 %35 %uint_6 %uint_8 %uint_0 %uint_0 %uint_3 %300 = OpExtInst %void %1 DebugTypeMember %298 %26 %35 %uint_6 %uint_8 %uint_0 %uint_0 %uint_3 %301 = OpExtInst %void %1 DebugTypeComposite %302 %uint_1 %35 %uint_17 %uint_0 %53 %302 %uint_0 %uint_3 %295 %297 %299 %300 %_ptr_PushConstant_UniformBufferObject = OpTypePointer PushConstant %UniformBufferObject %304 = OpExtInst %void %1 DebugTypePointer %301 %uint_9 %uint_0 %ubo = OpVariable %_ptr_PushConstant_UniformBufferObject PushConstant %306 = OpExtInst %void %1 DebugGlobalVariable %307 %301 %35 %uint_17 %uint_0 %53 %307 %ubo %uint_8 %_ptr_PushConstant_v4float = OpTypePointer PushConstant %v4float %309 = OpExtInst %void %1 DebugTypePointer %29 %uint_9 %uint_0 %_ptr_Function_v4float = OpTypePointer Function %v4float %314 = OpExtInst %void %1 DebugTypePointer %29 %uint_7 %uint_0 %uint_18 = OpConstant %uint 18 %317 = OpExtInst %void %1 DebugLocalVariable %318 %31 %35 %uint_18 %uint_0 %61 %uint_4 %t_normal = OpVariable %_ptr_UniformConstant_83 UniformConstant %323 = OpExtInst %void %1 DebugGlobalVariable %324 %84 %35 %uint_18 %uint_0 %53 %324 %t_normal %uint_8 %uint_19 = OpConstant %uint 19 %float_2 = OpConstant %float 2 %float_1 = OpConstant %float 1 %mat3v3float = OpTypeMatrix %v3float 3 %340 = OpExtInst %void %1 DebugTypeMatrix %31 %uint_3 %true %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float %342 = OpExtInst %void %1 DebugTypePointer %340 %uint_7 %uint_0 %uint_21 = OpConstant %uint 21 %344 = OpExtInst %void %1 DebugLocalVariable %345 %340 %35 %uint_21 %uint_0 %61 %uint_4 %_arr_v3float_uint_3 = OpTypeArray %v3float %uint_3 %350 = OpExtInst %void %1 DebugTypeArray %31 %uint_3 %_ptr_Input__arr_v3float_uint_3 = OpTypePointer Input %_arr_v3float_uint_3 %352 = OpExtInst %void %1 DebugTypePointer %350 %uint_1 %uint_0 %inTBN = OpVariable %_ptr_Input__arr_v3float_uint_3 Input %354 = OpExtInst %void %1 DebugGlobalVariable %355 %350 %35 %uint_21 %uint_0 %53 %355 %inTBN %uint_8 %_ptr_Input_v3float = OpTypePointer Input %v3float %357 = OpExtInst %void %1 DebugTypePointer %31 %uint_1 %uint_0 %int_1 = OpConstant %int 1 %int_2 = OpConstant %int 2 %float_0 = OpConstant %float 0 %uint_22 = OpConstant %uint 22 %uint_24 = OpConstant %uint 24 %388 = OpExtInst %void %1 DebugLocalVariable %389 %26 %35 %uint_24 %uint_0 %61 %uint_4 %t_specular = OpVariable %_ptr_UniformConstant_83 UniformConstant %394 = OpExtInst %void %1 DebugGlobalVariable %395 %84 %35 %uint_24 %uint_0 %53 %395 %t_specular %uint_8 %uint_25 = OpConstant %uint 25 %403 = OpExtInst %void %1 DebugLocalVariable %224 %26 %35 %uint_25 %uint_0 %61 %uint_4 %t_metallic = OpVariable %_ptr_UniformConstant_83 UniformConstant %408 = OpExtInst %void %1 DebugGlobalVariable %409 %84 %35 %uint_25 %uint_0 %53 %409 %t_metallic %uint_8 %417 = OpExtInst %void %1 DebugLocalVariable %136 %26 %35 %uint_26 %uint_0 %61 %uint_4 %t_roughness = OpVariable %_ptr_UniformConstant_83 UniformConstant %421 = OpExtInst %void %1 DebugGlobalVariable %422 %84 %35 %uint_26 %uint_0 %53 %422 %t_roughness %uint_8 %int_6 = OpConstant %int 6 %t_ao = OpVariable %_ptr_UniformConstant_83 UniformConstant %uint_27 = OpConstant %uint 27 %431 = OpExtInst %void %1 DebugGlobalVariable %432 %84 %35 %uint_27 %uint_0 %53 %432 %t_ao %uint_8 %int_3 = OpConstant %int 3 %uint_29 = OpConstant %uint 29 %_ptr_PushConstant_float = OpTypePointer PushConstant %float %447 = OpExtInst %void %1 DebugTypePointer %26 %uint_9 %uint_0 %int_4 = OpConstant %int 4 %uint_30 = OpConstant %uint 30 %int_5 = OpConstant %int 5 %uint_31 = OpConstant %uint 31 %t_emissive = OpVariable %_ptr_UniformConstant_83 UniformConstant %469 = OpExtInst %void %1 DebugGlobalVariable %470 %84 %35 %uint_32 %uint_0 %53 %470 %t_emissive %uint_8 %uint_34 = OpConstant %uint 34 %487 = OpExtInst %void %1 DebugLocalVariable %488 %29 %76 %uint_17 %uint_0 %98 %uint_4 %uint_20 = OpConstant %uint 20 %float_0_5 = OpConstant %float 0.5 %523 = OpTypeImage %float 2D 1 0 0 1 Unknown %uint_23 = OpConstant %uint 23 %524 = OpExtInst %void %1 DebugTypeComposite %85 %uint_0 %76 %uint_23 %uint_0 %53 %86 %80 %uint_3 %526 = OpTypeSampledImage %523 %527 = OpExtInst %void %1 DebugTypeComposite %282 %uint_0 %76 %uint_23 %uint_0 %53 %283 %80 %uint_3 %_ptr_UniformConstant_526 = OpTypePointer UniformConstant %526 %529 = OpExtInst %void %1 DebugTypePointer %527 %uint_0 %uint_0 %t_depthshadowshadowSampler = OpVariable %_ptr_UniformConstant_526 UniformConstant %531 = OpExtInst %void %1 DebugGlobalVariable %532 %527 %76 %uint_23 %uint_0 %53 %532 %t_depthshadowshadowSampler %uint_8 %544 = OpExtInst %void %1 DebugLocalVariable %545 %26 %125 %uint_4 %uint_0 %124 %uint_4 %552 = OpExtInst %void %1 DebugLocalVariable %553 %26 %125 %uint_5 %uint_0 %124 %uint_4 %560 = OpExtInst %void %1 DebugLocalVariable %561 %26 %125 %uint_6 %uint_0 %124 %uint_4 %569 = OpExtInst %void %1 DebugLocalVariable %570 %26 %125 %uint_7 %uint_0 %124 %uint_4 %577 = OpExtInst %void %1 DebugLocalVariable %578 %26 %125 %uint_9 %uint_0 %124 %uint_4 %583 = OpExtInst %void %1 DebugLocalVariable %584 %26 %125 %uint_10 %uint_0 %124 %uint_4 %float_3_1415925 = OpConstant %float 3.1415925 %607 = OpExtInst %void %1 DebugLocalVariable %608 %26 %125 %uint_18 %uint_0 %145 %uint_4 %614 = OpExtInst %void %1 DebugLocalVariable %615 %26 %125 %uint_19 %uint_0 %145 %uint_4 %float_8 = OpConstant %float 8 %624 = OpExtInst %void %1 DebugLocalVariable %578 %26 %125 %uint_21 %uint_0 %145 %uint_4 %629 = OpExtInst %void %1 DebugLocalVariable %584 %26 %125 %uint_22 %uint_0 %145 %uint_4 %uint_28 = OpConstant %uint 28 %647 = OpExtInst %void %1 DebugLocalVariable %147 %26 %125 %uint_28 %uint_0 %162 %uint_4 %656 = OpExtInst %void %1 DebugLocalVariable %657 %26 %125 %uint_29 %uint_0 %162 %uint_4 %665 = OpExtInst %void %1 DebugLocalVariable %666 %26 %125 %uint_30 %uint_0 %162 %uint_4 %675 = OpExtInst %void %1 DebugLocalVariable %676 %26 %125 %uint_31 %uint_0 %162 %uint_4 %uint_33 = OpConstant %uint 33 %uint_38 = OpConstant %uint 38 %float_5 = OpConstant %float 5 %uint_53 = OpConstant %uint 53 %711 = OpExtInst %void %1 DebugLocalVariable %128 %31 %125 %uint_53 %uint_0 %207 %uint_4 %uint_54 = OpConstant %uint 54 %718 = OpExtInst %void %1 DebugLocalVariable %169 %31 %125 %uint_54 %uint_0 %207 %uint_4 %uint_56 = OpConstant %uint 56 %727 = OpExtInst %void %1 DebugLocalVariable %191 %31 %125 %uint_56 %uint_0 %207 %uint_4 %float_0_0399999991 = OpConstant %float 0.0399999991 %732 = OpConstantComposite %v3float %float_0_0399999991 %float_0_0399999991 %float_0_0399999991 %uint_57 = OpConstant %uint 57 %uint_60 = OpConstant %uint 60 %741 = OpExtInst %void %1 DebugLocalVariable %133 %31 %125 %uint_60 %uint_0 %207 %uint_4 %uint_61 = OpConstant %uint 61 %750 = OpExtInst %void %1 DebugLocalVariable %751 %31 %125 %uint_61 %uint_0 %207 %uint_4 %uint_64 = OpConstant %uint 64 %759 = OpExtInst %void %1 DebugLocalVariable %760 %26 %125 %uint_64 %uint_0 %207 %uint_4 %uint_65 = OpConstant %uint 65 %772 = OpExtInst %void %1 DebugLocalVariable %773 %26 %125 %uint_65 %uint_0 %207 %uint_4 %uint_66 = OpConstant %uint 66 %787 = OpExtInst %void %1 DebugLocalVariable %788 %31 %125 %uint_66 %uint_0 %207 %uint_4 %uint_68 = OpConstant %uint 68 %801 = OpExtInst %void %1 DebugLocalVariable %802 %31 %125 %uint_68 %uint_0 %207 %uint_4 %uint_69 = OpConstant %uint 69 %808 = OpExtInst %void %1 DebugLocalVariable %809 %31 %125 %uint_69 %uint_0 %207 %uint_4 %813 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint_70 = OpConstant %uint 70 %823 = OpExtInst %void %1 DebugLocalVariable %824 %31 %125 %uint_72 %uint_0 %207 %uint_4 %uint_73 = OpConstant %uint 73 %833 = OpExtInst %void %1 DebugLocalVariable %834 %26 %125 %uint_73 %uint_0 %207 %uint_4 %float_4 = OpConstant %float 4 %float_9_99999975en05 = OpConstant %float 9.99999975e-05 %uint_74 = OpConstant %uint 74 %852 = OpExtInst %void %1 DebugLocalVariable %389 %31 %125 %uint_74 %uint_0 %207 %uint_4 %uint_77 = OpConstant %uint 77 %861 = OpExtInst %void %1 DebugLocalVariable %657 %26 %125 %uint_77 %uint_0 %207 %uint_4 %uint_78 = OpConstant %uint 78 %870 = OpExtInst %void %1 DebugLocalVariable %871 %31 %125 %uint_78 %uint_0 %207 %uint_4 %uint_80 = OpConstant %uint 80 %uint_41 = OpConstant %uint 41 %906 = OpExtInst %void %1 DebugLocalVariable %907 %49 %245 %uint_74 %uint_0 %254 %uint_4 %_ptr_Output_v4float = OpTypePointer Output %v4float %912 = OpExtInst %void %1 DebugTypePointer %29 %uint_3 %uint_0 %outcolor = OpVariable %_ptr_Output_v4float Output %uint_75 = OpConstant %uint 75 %914 = OpExtInst %void %1 DebugGlobalVariable %915 %29 %245 %uint_75 %uint_0 %53 %915 %outcolor %uint_8 %917 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %outnormal = OpVariable %_ptr_Output_v4float Output %uint_76 = OpConstant %uint 76 %920 = OpExtInst %void %1 DebugGlobalVariable %921 %29 %245 %uint_76 %uint_0 %53 %921 %outnormal %uint_8 %_ptr_Function_uint = OpTypePointer Function %uint %931 = OpExtInst %void %1 DebugTypePointer %17 %uint_7 %uint_0 %uint_81 = OpConstant %uint 81 %933 = OpExtInst %void %1 DebugLocalVariable %934 %17 %245 %uint_81 %uint_0 %254 %uint_4 %v4uint = OpTypeVector %uint 4 %949 = OpExtInst %void %1 DebugTypeVector %17 %uint_4 %v3uint = OpTypeVector %uint 3 %951 = OpExtInst %void %1 DebugTypeVector %17 %uint_3 %EngineData_Internal = OpTypeStruct %mat4v4float %mat4v4float %mat4v4float %v4uint %v3float %v3uint %uint %uint %float %float %953 = OpExtInst %void %1 DebugTypeMember %954 %66 %245 %uint_4 %uint_10 %uint_0 %uint_0 %uint_3 %955 = OpExtInst %void %1 DebugTypeMember %954 %66 %245 %uint_4 %uint_10 %uint_0 %uint_0 %uint_3 %956 = OpExtInst %void %1 DebugTypeMember %954 %66 %245 %uint_4 %uint_10 %uint_0 %uint_0 %uint_3 %957 = OpExtInst %void %1 DebugTypeMember %958 %949 %245 %uint_5 %uint_11 %uint_0 %uint_0 %uint_3 %959 = OpExtInst %void %1 DebugTypeMember %215 %31 %245 %uint_6 %uint_10 %uint_0 %uint_0 %uint_3 %960 = OpExtInst %void %1 DebugTypeMember %961 %951 %245 %uint_7 %uint_11 %uint_0 %uint_0 %uint_3 %962 = OpExtInst %void %1 DebugTypeMember %963 %17 %245 %uint_9 %uint_10 %uint_0 %uint_0 %uint_3 %964 = OpExtInst %void %1 DebugTypeMember %963 %17 %245 %uint_9 %uint_10 %uint_0 %uint_0 %uint_3 %965 = OpExtInst %void %1 DebugTypeMember %966 %26 %245 %uint_11 %uint_11 %uint_0 %uint_0 %uint_3 %967 = OpExtInst %void %1 DebugTypeMember %966 %26 %245 %uint_11 %uint_11 %uint_0 %uint_0 %uint_3 %968 = OpExtInst %void %1 DebugTypeComposite %969 %uint_1 %245 %uint_81 %uint_0 %53 %969 %uint_0 %uint_3 %953 %955 %956 %957 %959 %960 %962 %964 %965 %967 %_runtimearr_EngineData_Internal = OpTypeRuntimeArray %EngineData_Internal %971 = OpExtInst %void %1 DebugTypeArray %968 %uint_0 %lightAuxDataSSBO = OpTypeStruct %_runtimearr_EngineData_Internal %uint_15 = OpConstant %uint 15 %973 = OpExtInst %void %1 DebugTypeMember %974 %971 %245 %uint_15 %uint_25 %uint_0 %uint_0 %uint_3 %976 = OpExtInst %void %1 DebugTypeComposite %977 %uint_1 %245 %uint_81 %uint_0 %53 %977 %uint_0 %uint_3 %973 %_ptr_StorageBuffer_lightAuxDataSSBO = OpTypePointer StorageBuffer %lightAuxDataSSBO %979 = OpExtInst %void %1 DebugTypePointer %976 %uint_12 %uint_0 %_ = OpVariable %_ptr_StorageBuffer_lightAuxDataSSBO StorageBuffer %981 = OpExtInst %void %1 DebugGlobalVariable %2 %976 %245 %uint_81 %uint_0 %53 %2 %_ %uint_8 %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint %983 = OpExtInst %void %1 DebugTypePointer %17 %uint_12 %uint_0 %AmbientLightData = OpTypeStruct %v3float %float %988 = OpExtInst %void %1 DebugTypeMember %34 %31 %245 %uint_34 %uint_10 %uint_0 %uint_0 %uint_3 %uint_35 = OpConstant %uint 35 %989 = OpExtInst %void %1 DebugTypeMember %990 %26 %245 %uint_35 %uint_11 %uint_0 %uint_0 %uint_3 %uint_82 = OpConstant %uint 82 %992 = OpExtInst %void %1 DebugTypeComposite %993 %uint_1 %245 %uint_82 %uint_0 %53 %993 %uint_0 %uint_3 %988 %989 %_ptr_Function_AmbientLightData = OpTypePointer Function %AmbientLightData %996 = OpExtInst %void %1 DebugTypePointer %992 %uint_7 %uint_0 %998 = OpExtInst %void %1 DebugLocalVariable %999 %992 %245 %uint_82 %uint_0 %254 %uint_4 %AmbientLightData_0 = OpTypeStruct %v3float %float %1004 = OpExtInst %void %1 DebugTypeMember %34 %31 %245 %uint_34 %uint_10 %uint_0 %uint_0 %uint_3 %1005 = OpExtInst %void %1 DebugTypeMember %990 %26 %245 %uint_35 %uint_11 %uint_0 %uint_0 %uint_3 %1006 = OpExtInst %void %1 DebugTypeComposite %993 %uint_1 %245 %uint_82 %uint_0 %53 %993 %uint_0 %uint_3 %1004 %1005 %_runtimearr_AmbientLightData_0 = OpTypeRuntimeArray %AmbientLightData_0 %1008 = OpExtInst %void %1 DebugTypeArray %1006 %uint_0 %ambientLightSSBO = OpTypeStruct %_runtimearr_AmbientLightData_0 %uint_39 = OpConstant %uint 39 %1010 = OpExtInst %void %1 DebugTypeMember %1011 %1008 %245 %uint_39 %uint_22 %uint_0 %uint_0 %uint_3 %1013 = OpExtInst %void %1 DebugTypeComposite %1014 %uint_1 %245 %uint_82 %uint_0 %53 %1014 %uint_0 %uint_3 %1010 %_ptr_StorageBuffer_ambientLightSSBO = OpTypePointer StorageBuffer %ambientLightSSBO %1016 = OpExtInst %void %1 DebugTypePointer %1013 %uint_12 %uint_0 %__0 = OpVariable %_ptr_StorageBuffer_ambientLightSSBO StorageBuffer %1018 = OpExtInst %void %1 DebugGlobalVariable %2 %1013 %245 %uint_82 %uint_0 %53 %2 %__0 %uint_8 %_ptr_StorageBuffer_AmbientLightData_0 = OpTypePointer StorageBuffer %AmbientLightData_0 %1021 = OpExtInst %void %1 DebugTypePointer %1006 %uint_12 %uint_0 %uint_84 = OpConstant %uint 84 %1026 = OpExtInst %void %1 DebugLocalVariable %43 %26 %245 %uint_84 %uint_0 %254 %uint_4 %uint_91 = OpConstant %uint 91 %uint_96 = OpConstant %uint 96 %1053 = OpExtInst %void %1 DebugLocalVariable %934 %17 %245 %uint_96 %uint_0 %254 %uint_4 %int_7 = OpConstant %int 7 %DirectionalLightData = OpTypeStruct %mat4v4float %v3float %v3float %float %int %int %uint_43 = OpConstant %uint 43 %1073 = OpExtInst %void %1 DebugTypeMember %106 %66 %245 %uint_43 %uint_10 %uint_0 %uint_0 %uint_3 %uint_45 = OpConstant %uint 45 %1075 = OpExtInst %void %1 DebugTypeMember %1076 %31 %245 %uint_45 %uint_10 %uint_0 %uint_0 %uint_3 %1078 = OpExtInst %void %1 DebugTypeMember %1076 %31 %245 %uint_45 %uint_10 %uint_0 %uint_0 %uint_3 %uint_46 = OpConstant %uint 46 %1079 = OpExtInst %void %1 DebugTypeMember %990 %26 %245 %uint_46 %uint_11 %uint_0 %uint_0 %uint_3 %uint_48 = OpConstant %uint 48 %1081 = OpExtInst %void %1 DebugTypeMember %1082 %269 %245 %uint_48 %uint_9 %uint_0 %uint_0 %uint_3 %1084 = OpExtInst %void %1 DebugTypeMember %1082 %269 %245 %uint_48 %uint_9 %uint_0 %uint_0 %uint_3 %uint_97 = OpConstant %uint 97 %1085 = OpExtInst %void %1 DebugTypeComposite %1086 %uint_1 %245 %uint_97 %uint_0 %53 %1086 %uint_0 %uint_3 %1073 %1075 %1078 %1079 %1081 %1084 %_ptr_Function_DirectionalLightData = OpTypePointer Function %DirectionalLightData %1089 = OpExtInst %void %1 DebugTypePointer %1085 %uint_7 %uint_0 %1091 = OpExtInst %void %1 DebugLocalVariable %999 %1085 %245 %uint_97 %uint_0 %254 %uint_4 %DirectionalLightData_0 = OpTypeStruct %mat4v4float %v3float %v3float %float %int %int %1096 = OpExtInst %void %1 DebugTypeMember %106 %66 %245 %uint_43 %uint_10 %uint_0 %uint_0 %uint_3 %1097 = OpExtInst %void %1 DebugTypeMember %1076 %31 %245 %uint_45 %uint_10 %uint_0 %uint_0 %uint_3 %1098 = OpExtInst %void %1 DebugTypeMember %1076 %31 %245 %uint_45 %uint_10 %uint_0 %uint_0 %uint_3 %1099 = OpExtInst %void %1 DebugTypeMember %990 %26 %245 %uint_46 %uint_11 %uint_0 %uint_0 %uint_3 %1100 = OpExtInst %void %1 DebugTypeMember %1082 %269 %245 %uint_48 %uint_9 %uint_0 %uint_0 %uint_3 %1101 = OpExtInst %void %1 DebugTypeMember %1082 %269 %245 %uint_48 %uint_9 %uint_0 %uint_0 %uint_3 %1102 = OpExtInst %void %1 DebugTypeComposite %1086 %uint_1 %245 %uint_97 %uint_0 %53 %1086 %uint_0 %uint_3 %1096 %1097 %1098 %1099 %1100 %1101 %_runtimearr_DirectionalLightData_0 = OpTypeRuntimeArray %DirectionalLightData_0 %1104 = OpExtInst %void %1 DebugTypeArray %1102 %uint_0 %dirLightSSBO = OpTypeStruct %_runtimearr_DirectionalLightData_0 %1106 = OpExtInst %void %1 DebugTypeMember %1107 %1104 %245 %uint_52 %uint_26 %uint_0 %uint_0 %uint_3 %1108 = OpExtInst %void %1 DebugTypeComposite %1109 %uint_1 %245 %uint_97 %uint_0 %53 %1109 %uint_0 %uint_3 %1106 %_ptr_StorageBuffer_dirLightSSBO = OpTypePointer StorageBuffer %dirLightSSBO %1111 = OpExtInst %void %1 DebugTypePointer %1108 %uint_12 %uint_0 %__1 = OpVariable %_ptr_StorageBuffer_dirLightSSBO StorageBuffer %1113 = OpExtInst %void %1 DebugGlobalVariable %2 %1108 %245 %uint_97 %uint_0 %53 %2 %__1 %uint_8 %_ptr_StorageBuffer_DirectionalLightData_0 = OpTypePointer StorageBuffer %DirectionalLightData_0 %1116 = OpExtInst %void %1 DebugTypePointer %1102 %uint_12 %uint_0 %uint_98 = OpConstant %uint 98 %1121 = OpExtInst %void %1 DebugLocalVariable %1122 %31 %245 %uint_98 %uint_0 %254 %uint_4 %worldPosition = OpVariable %_ptr_Input_v3float Input %1127 = OpExtInst %void %1 DebugGlobalVariable %1128 %31 %245 %uint_98 %uint_0 %53 %1128 %worldPosition %uint_8 %_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float %1139 = OpExtInst %void %1 DebugTypePointer %31 %uint_12 %uint_0 %uint_99 = OpConstant %uint 99 %1161 = OpExtInst %void %1 DebugLocalVariable %1162 %26 %245 %uint_99 %uint_0 %254 %uint_4 %_ptr_Function_int = OpTypePointer Function %int %1167 = OpExtInst %void %1 DebugTypePointer %269 %uint_7 %uint_0 %uint_101 = OpConstant %uint 101 %uint_102 = OpConstant %uint 102 %1175 = OpExtInst %void %1 DebugTypeComposite %75 %uint_1 %245 %uint_102 %uint_0 %53 %79 %80 %uint_3 %shadowSampler_0 = OpVariable %_ptr_UniformConstant_73 UniformConstant %1178 = OpExtInst %void %1 DebugGlobalVariable %109 %1175 %245 %uint_102 %uint_0 %53 %109 %shadowSampler_0 %uint_8 %_runtimearr_83 = OpTypeRuntimeArray %83 %1180 = OpExtInst %void %1 DebugTypeArray %84 %uint_0 %_ptr_UniformConstant__runtimearr_83 = OpTypePointer UniformConstant %_runtimearr_83 %1182 = OpExtInst %void %1 DebugTypePointer %1180 %uint_0 %uint_0 %shadowMaps = OpVariable %_ptr_UniformConstant__runtimearr_83 UniformConstant %1184 = OpExtInst %void %1 DebugGlobalVariable %1185 %1180 %245 %uint_102 %uint_0 %53 %1185 %shadowMaps %uint_8 %uint_105 = OpConstant %uint 105 %uint_110 = OpConstant %uint 110 %1217 = OpExtInst %void %1 DebugLocalVariable %1218 %17 %245 %uint_110 %uint_0 %254 %uint_4 %viewPosition = OpVariable %_ptr_Input_v3float Input %1224 = OpExtInst %void %1 DebugGlobalVariable %1225 %31 %245 %uint_110 %uint_0 %53 %1225 %viewPosition %uint_8 %_ptr_Input_float = OpTypePointer Input %float %1227 = OpExtInst %void %1 DebugTypePointer %26 %uint_1 %uint_0 %int_9 = OpConstant %int 9 %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float %1233 = OpExtInst %void %1 DebugTypePointer %26 %uint_12 %uint_0 %int_8 = OpConstant %int 8 %_ptr_Function_v2float = OpTypePointer Function %v2float %1252 = OpExtInst %void %1 DebugTypePointer %286 %uint_7 %uint_0 %uint_111 = OpConstant %uint 111 %1254 = OpExtInst %void %1 DebugLocalVariable %1255 %286 %245 %uint_111 %uint_0 %254 %uint_4 %v2uint = OpTypeVector %uint 2 %1260 = OpExtInst %void %1 DebugTypeVector %17 %uint_2 %_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint %1262 = OpExtInst %void %1 DebugTypePointer %949 %uint_12 %uint_0 %_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint %1267 = OpExtInst %void %1 DebugTypePointer %951 %uint_12 %uint_0 %uint_113 = OpConstant %uint 113 %1274 = OpExtInst %void %1 DebugLocalVariable %1275 %286 %245 %uint_113 %uint_0 %254 %uint_4 %_ptr_Input_v4float = OpTypePointer Input %v4float %1280 = OpExtInst %void %1 DebugTypePointer %29 %uint_1 %uint_0 %gl_FragCoord = OpVariable %_ptr_Input_v4float Input %1282 = OpExtInst %void %1 DebugGlobalVariable %1283 %29 %245 %uint_113 %uint_0 %53 %1283 %gl_FragCoord %uint_8 %_ptr_Function_v3uint = OpTypePointer Function %v3uint %1292 = OpExtInst %void %1 DebugTypePointer %951 %uint_7 %uint_0 %uint_115 = OpConstant %uint 115 %1294 = OpExtInst %void %1 DebugLocalVariable %1295 %951 %245 %uint_115 %uint_0 %254 %uint_4 %uint_116 = OpConstant %uint 116 %1308 = OpExtInst %void %1 DebugLocalVariable %1309 %17 %245 %uint_116 %uint_0 %254 %uint_4 %uint_120 = OpConstant %uint 120 %1331 = OpExtInst %void %1 DebugLocalVariable %1332 %17 %245 %uint_120 %uint_0 %254 %uint_4 %_arr_uint_uint_16 = OpTypeArray %uint %uint_16 %1337 = OpExtInst %void %1 DebugTypeArray %17 %uint_16 %_arr_uint_uint_16_0 = OpTypeArray %uint %uint_16 %1339 = OpExtInst %void %1 DebugTypeArray %17 %uint_16 %Cluster = OpTypeStruct %v3float %v3float %uint %uint %_arr_uint_uint_16 %_arr_uint_uint_16_0 %1341 = OpExtInst %void %1 DebugTypeMember %1342 %31 %245 %uint_6 %uint_10 %uint_0 %uint_0 %uint_3 %1343 = OpExtInst %void %1 DebugTypeMember %1342 %31 %245 %uint_6 %uint_10 %uint_0 %uint_0 %uint_3 %1344 = OpExtInst %void %1 DebugTypeMember %1345 %17 %245 %uint_8 %uint_10 %uint_0 %uint_0 %uint_3 %1346 = OpExtInst %void %1 DebugTypeMember %1345 %17 %245 %uint_8 %uint_10 %uint_0 %uint_0 %uint_3 %1347 = OpExtInst %void %1 DebugTypeMember %1348 %1337 %245 %uint_9 %uint_10 %uint_0 %uint_0 %uint_3 %1349 = OpExtInst %void %1 DebugTypeMember %1350 %1339 %245 %uint_10 %uint_10 %uint_0 %uint_0 %uint_3 %1351 = OpExtInst %void %1 DebugTypeComposite %1352 %uint_1 %245 %uint_120 %uint_0 %53 %1352 %uint_0 %uint_3 %1341 %1343 %1344 %1346 %1347 %1349 %_runtimearr_Cluster = OpTypeRuntimeArray %Cluster %1354 = OpExtInst %void %1 DebugTypeArray %1351 %uint_0 %clusterSSBO = OpTypeStruct %_runtimearr_Cluster %uint_62 = OpConstant %uint 62 %1356 = OpExtInst %void %1 DebugTypeMember %1357 %1354 %245 %uint_62 %uint_13 %uint_0 %uint_0 %uint_3 %1359 = OpExtInst %void %1 DebugTypeComposite %1360 %uint_1 %245 %uint_120 %uint_0 %53 %1360 %uint_0 %uint_3 %1356 %_ptr_StorageBuffer_clusterSSBO = OpTypePointer StorageBuffer %clusterSSBO %1362 = OpExtInst %void %1 DebugTypePointer %1359 %uint_12 %uint_0 %__2 = OpVariable %_ptr_StorageBuffer_clusterSSBO StorageBuffer %1364 = OpExtInst %void %1 DebugGlobalVariable %2 %1359 %245 %uint_120 %uint_0 %53 %2 %__2 %uint_8 %uint_123 = OpConstant %uint 123 %1369 = OpExtInst %void %1 DebugLocalVariable %934 %17 %245 %uint_123 %uint_0 %254 %uint_4 %uint_124 = OpConstant %uint 124 %1389 = OpExtInst %void %1 DebugLocalVariable %1390 %17 %245 %uint_124 %uint_0 %254 %uint_4 %PointLight = OpTypeStruct %v3float %v3float %float %int %uint %1400 = OpExtInst %void %1 DebugTypeMember %34 %31 %245 %uint_17 %uint_10 %uint_0 %uint_0 %uint_3 %1401 = OpExtInst %void %1 DebugTypeMember %34 %31 %245 %uint_17 %uint_10 %uint_0 %uint_0 %uint_3 %1402 = OpExtInst %void %1 DebugTypeMember %990 %26 %245 %uint_18 %uint_11 %uint_0 %uint_0 %uint_3 %1403 = OpExtInst %void %1 DebugTypeMember %1404 %269 %245 %uint_19 %uint_9 %uint_0 %uint_0 %uint_3 %1405 = OpExtInst %void %1 DebugTypeMember %1082 %17 %245 %uint_20 %uint_10 %uint_0 %uint_0 %uint_3 %uint_125 = OpConstant %uint 125 %1406 = OpExtInst %void %1 DebugTypeComposite %1407 %uint_1 %245 %uint_125 %uint_0 %53 %1407 %uint_0 %uint_3 %1400 %1401 %1402 %1403 %1405 %_ptr_Function_PointLight = OpTypePointer Function %PointLight %1410 = OpExtInst %void %1 DebugTypePointer %1406 %uint_7 %uint_0 %1412 = OpExtInst %void %1 DebugLocalVariable %999 %1406 %245 %uint_125 %uint_0 %254 %uint_4 %PointLight_0 = OpTypeStruct %v3float %v3float %float %int %uint %1416 = OpExtInst %void %1 DebugTypeMember %34 %31 %245 %uint_17 %uint_10 %uint_0 %uint_0 %uint_3 %1417 = OpExtInst %void %1 DebugTypeMember %34 %31 %245 %uint_17 %uint_10 %uint_0 %uint_0 %uint_3 %1418 = OpExtInst %void %1 DebugTypeMember %990 %26 %245 %uint_18 %uint_11 %uint_0 %uint_0 %uint_3 %1419 = OpExtInst %void %1 DebugTypeMember %1404 %269 %245 %uint_19 %uint_9 %uint_0 %uint_0 %uint_3 %1420 = OpExtInst %void %1 DebugTypeMember %1082 %17 %245 %uint_20 %uint_10 %uint_0 %uint_0 %uint_3 %1421 = OpExtInst %void %1 DebugTypeComposite %1407 %uint_1 %245 %uint_125 %uint_0 %53 %1407 %uint_0 %uint_3 %1416 %1417 %1418 %1419 %1420 %_runtimearr_PointLight_0 = OpTypeRuntimeArray %PointLight_0 %1423 = OpExtInst %void %1 DebugTypeArray %1421 %uint_0 %pointLightSSBO = OpTypeStruct %_runtimearr_PointLight_0 %uint_58 = OpConstant %uint 58 %1425 = OpExtInst %void %1 DebugTypeMember %1426 %1423 %245 %uint_58 %uint_16 %uint_0 %uint_0 %uint_3 %1428 = OpExtInst %void %1 DebugTypeComposite %1429 %uint_1 %245 %uint_125 %uint_0 %53 %1429 %uint_0 %uint_3 %1425 %_ptr_StorageBuffer_pointLightSSBO = OpTypePointer StorageBuffer %pointLightSSBO %1431 = OpExtInst %void %1 DebugTypePointer %1428 %uint_12 %uint_0 %__3 = OpVariable %_ptr_StorageBuffer_pointLightSSBO StorageBuffer %1433 = OpExtInst %void %1 DebugGlobalVariable %2 %1428 %245 %uint_125 %uint_0 %53 %2 %__3 %uint_8 %_ptr_StorageBuffer_PointLight_0 = OpTypePointer StorageBuffer %PointLight_0 %1436 = OpExtInst %void %1 DebugTypePointer %1421 %uint_12 %uint_0 %uint_127 = OpConstant %uint 127 %1441 = OpExtInst %void %1 DebugLocalVariable %1076 %31 %245 %uint_127 %uint_0 %254 %uint_4 %uint_129 = OpConstant %uint 129 %1451 = OpExtInst %void %1 DebugLocalVariable %249 %26 %245 %uint_129 %uint_0 %254 %uint_4 %uint_131 = OpConstant %uint 131 %1460 = OpExtInst %void %1 DebugLocalVariable %1461 %31 %245 %uint_131 %uint_0 %254 %uint_4 %uint_132 = OpConstant %uint 132 %1497 = OpExtInst %void %1 DebugLocalVariable %1162 %26 %245 %uint_132 %uint_0 %254 %uint_4 %uint_134 = OpConstant %uint 134 %uint_136 = OpConstant %uint 136 %1509 = OpExtInst %void %1 DebugLocalVariable %1510 %31 %245 %uint_136 %uint_0 %254 %uint_4 %uint_137 = OpConstant %uint 137 %1520 = OpExtInst %void %1 DebugLocalVariable %1521 %26 %245 %uint_137 %uint_0 %254 %uint_4 %uint_138 = OpConstant %uint 138 %1528 = OpExtInst %void %1 DebugLocalVariable %1529 %31 %245 %uint_138 %uint_0 %254 %uint_4 %uint_140 = OpConstant %uint 140 %1536 = OpExtInst %void %1 DebugLocalVariable %1537 %26 %245 %uint_140 %uint_0 %254 %uint_4 %uint_142 = OpConstant %uint 142 %1553 = OpExtInst %void %1 DebugLocalVariable %1554 %26 %245 %uint_142 %uint_0 %254 %uint_4 %uint_143 = OpConstant %uint 143 %1561 = OpExtInst %void %1 DebugLocalVariable %545 %26 %245 %uint_143 %uint_0 %254 %uint_4 %uint_144 = OpConstant %uint 144 %1566 = OpExtInst %void %1 DebugLocalVariable %1567 %26 %245 %uint_144 %uint_0 %254 %uint_4 %uint_145 = OpConstant %uint 145 %1573 = OpExtInst %void %1 DebugLocalVariable %1574 %26 %245 %uint_145 %uint_0 %254 %uint_4 %uint_146 = OpConstant %uint 146 %1584 = OpExtInst %void %1 DebugLocalVariable %1585 %26 %245 %uint_146 %uint_0 %254 %uint_4 %1592 = OpTypeImage %float Cube 0 0 0 1 Unknown %uint_148 = OpConstant %uint 148 %1593 = OpExtInst %void %1 DebugTypeComposite %1594 %uint_0 %245 %uint_148 %uint_0 %53 %1596 %80 %uint_3 %_runtimearr_1592 = OpTypeRuntimeArray %1592 %1598 = OpExtInst %void %1 DebugTypeArray %1593 %uint_0 %_ptr_UniformConstant__runtimearr_1592 = OpTypePointer UniformConstant %_runtimearr_1592 %1600 = OpExtInst %void %1 DebugTypePointer %1598 %uint_0 %uint_0 %pointShadowMaps = OpVariable %_ptr_UniformConstant__runtimearr_1592 UniformConstant %1602 = OpExtInst %void %1 DebugGlobalVariable %1603 %1598 %245 %uint_148 %uint_0 %53 %1603 %pointShadowMaps %uint_8 %_ptr_UniformConstant_1592 = OpTypePointer UniformConstant %1592 %1608 = OpExtInst %void %1 DebugTypePointer %1593 %uint_0 %uint_0 %1612 = OpTypeImage %float Cube 1 0 0 1 Unknown %1613 = OpExtInst %void %1 DebugTypeComposite %1594 %uint_0 %245 %uint_148 %uint_0 %53 %1596 %80 %uint_3 %1614 = OpTypeSampledImage %1612 %1615 = OpExtInst %void %1 DebugTypeComposite %282 %uint_0 %245 %uint_148 %uint_0 %53 %283 %80 %uint_3 %uint_151 = OpConstant %uint 151 %uint_155 = OpConstant %uint 155 %1645 = OpExtInst %void %1 DebugLocalVariable %1646 %17 %245 %uint_155 %uint_0 %254 %uint_4 %uint_156 = OpConstant %uint 156 %1655 = OpExtInst %void %1 DebugLocalVariable %934 %17 %245 %uint_156 %uint_0 %254 %uint_4 %uint_157 = OpConstant %uint 157 %1675 = OpExtInst %void %1 DebugLocalVariable %1390 %17 %245 %uint_157 %uint_0 %254 %uint_4 %SpotLight = OpTypeStruct %mat4v4float %mat4v4float %v3float %float %float %float %int %uint %1685 = OpExtInst %void %1 DebugTypeMember %1686 %66 %245 %uint_25 %uint_10 %uint_0 %uint_0 %uint_3 %1687 = OpExtInst %void %1 DebugTypeMember %1686 %66 %245 %uint_25 %uint_10 %uint_0 %uint_0 %uint_3 %1688 = OpExtInst %void %1 DebugTypeMember %34 %31 %245 %uint_26 %uint_10 %uint_0 %uint_0 %uint_3 %1689 = OpExtInst %void %1 DebugTypeMember %1690 %26 %245 %uint_29 %uint_11 %uint_0 %uint_0 %uint_3 %1691 = OpExtInst %void %1 DebugTypeMember %1690 %26 %245 %uint_29 %uint_11 %uint_0 %uint_0 %uint_3 %1692 = OpExtInst %void %1 DebugTypeMember %1690 %26 %245 %uint_29 %uint_11 %uint_0 %uint_0 %uint_3 %1693 = OpExtInst %void %1 DebugTypeMember %1404 %269 %245 %uint_30 %uint_9 %uint_0 %uint_0 %uint_3 %1694 = OpExtInst %void %1 DebugTypeMember %1082 %17 %245 %uint_31 %uint_10 %uint_0 %uint_0 %uint_3 %uint_158 = OpConstant %uint 158 %1695 = OpExtInst %void %1 DebugTypeComposite %1696 %uint_1 %245 %uint_158 %uint_0 %53 %1696 %uint_0 %uint_3 %1685 %1687 %1688 %1689 %1691 %1692 %1693 %1694 %_ptr_Function_SpotLight = OpTypePointer Function %SpotLight %1699 = OpExtInst %void %1 DebugTypePointer %1695 %uint_7 %uint_0 %1701 = OpExtInst %void %1 DebugLocalVariable %999 %1695 %245 %uint_158 %uint_0 %254 %uint_4 %SpotLight_0 = OpTypeStruct %mat4v4float %mat4v4float %v3float %float %float %float %int %uint %1705 = OpExtInst %void %1 DebugTypeMember %1686 %66 %245 %uint_25 %uint_10 %uint_0 %uint_0 %uint_3 %1706 = OpExtInst %void %1 DebugTypeMember %1686 %66 %245 %uint_25 %uint_10 %uint_0 %uint_0 %uint_3 %1707 = OpExtInst %void %1 DebugTypeMember %34 %31 %245 %uint_26 %uint_10 %uint_0 %uint_0 %uint_3 %1708 = OpExtInst %void %1 DebugTypeMember %1690 %26 %245 %uint_29 %uint_11 %uint_0 %uint_0 %uint_3 %1709 = OpExtInst %void %1 DebugTypeMember %1690 %26 %245 %uint_29 %uint_11 %uint_0 %uint_0 %uint_3 %1710 = OpExtInst %void %1 DebugTypeMember %1690 %26 %245 %uint_29 %uint_11 %uint_0 %uint_0 %uint_3 %1711 = OpExtInst %void %1 DebugTypeMember %1404 %269 %245 %uint_30 %uint_9 %uint_0 %uint_0 %uint_3 %1712 = OpExtInst %void %1 DebugTypeMember %1082 %17 %245 %uint_31 %uint_10 %uint_0 %uint_0 %uint_3 %1713 = OpExtInst %void %1 DebugTypeComposite %1696 %uint_1 %245 %uint_158 %uint_0 %53 %1696 %uint_0 %uint_3 %1705 %1706 %1707 %1708 %1709 %1710 %1711 %1712 %_runtimearr_SpotLight_0 = OpTypeRuntimeArray %SpotLight_0 %1715 = OpExtInst %void %1 DebugTypeArray %1713 %uint_0 %spotLightSSBO = OpTypeStruct %_runtimearr_SpotLight_0 %1717 = OpExtInst %void %1 DebugTypeMember %1718 %1715 %245 %uint_66 %uint_15 %uint_0 %uint_0 %uint_3 %1719 = OpExtInst %void %1 DebugTypeComposite %1720 %uint_1 %245 %uint_158 %uint_0 %53 %1720 %uint_0 %uint_3 %1717 %_ptr_StorageBuffer_spotLightSSBO = OpTypePointer StorageBuffer %spotLightSSBO %1722 = OpExtInst %void %1 DebugTypePointer %1719 %uint_12 %uint_0 %__4 = OpVariable %_ptr_StorageBuffer_spotLightSSBO StorageBuffer %1724 = OpExtInst %void %1 DebugGlobalVariable %2 %1719 %245 %uint_158 %uint_0 %53 %2 %__4 %uint_8 %_ptr_StorageBuffer_SpotLight_0 = OpTypePointer StorageBuffer %SpotLight_0 %1727 = OpExtInst %void %1 DebugTypePointer %1713 %uint_12 %uint_0 %uint_160 = OpConstant %uint 160 %1732 = OpExtInst %void %1 DebugLocalVariable %1733 %29 %245 %uint_160 %uint_0 %254 %uint_4 %1739 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1 %uint_162 = OpConstant %uint 162 %1742 = OpExtInst %void %1 DebugLocalVariable %1076 %31 %245 %uint_162 %uint_0 %254 %uint_4 %uint_164 = OpConstant %uint 164 %1752 = OpExtInst %void %1 DebugLocalVariable %249 %26 %245 %uint_164 %uint_0 %254 %uint_4 %uint_167 = OpConstant %uint 167 %1761 = OpExtInst %void %1 DebugLocalVariable %1762 %26 %245 %uint_167 %uint_0 %254 %uint_4 %uint_168 = OpConstant %uint 168 %1771 = OpExtInst %void %1 DebugLocalVariable %1772 %340 %245 %uint_168 %uint_0 %254 %uint_4 %uint_169 = OpConstant %uint 169 %1786 = OpExtInst %void %1 DebugLocalVariable %1787 %31 %245 %uint_169 %uint_0 %254 %uint_4 %float_n1 = OpConstant %float -1 %1793 = OpConstantComposite %v3float %float_0 %float_n1 %float_0 %uint_171 = OpConstant %uint 171 %1797 = OpExtInst %void %1 DebugLocalVariable %1798 %26 %245 %uint_171 %uint_0 %254 %uint_4 %uint_173 = OpConstant %uint 173 %1807 = OpExtInst %void %1 DebugLocalVariable %1461 %31 %245 %uint_173 %uint_0 %254 %uint_4 %uint_175 = OpConstant %uint 175 %1843 = OpExtInst %void %1 DebugLocalVariable %1162 %26 %245 %uint_175 %uint_0 %254 %uint_4 %uint_176 = OpConstant %uint 176 %uint_177 = OpConstant %uint 177 %uint_180 = OpConstant %uint 180 %uint_182 = OpConstant %uint 182 %uint_186 = OpConstant %uint 186 %clipSpaceZ = OpVariable %_ptr_Input_float Input %1906 = OpExtInst %void %1 DebugGlobalVariable %1907 %26 %245 %uint_186 %uint_0 %53 %1907 %clipSpaceZ %uint_8 ; Function main %main = OpFunction %void None %13 %23 = OpLabel %user_out = OpVariable %_ptr_Function_LitOutput Function %i = OpVariable %_ptr_Function_uint Function %light = OpVariable %_ptr_Function_AmbientLightData Function %ao = OpVariable %_ptr_Function_float Function %i_0 = OpVariable %_ptr_Function_uint Function %light_0 = OpVariable %_ptr_Function_DirectionalLightData Function %lightResult = OpVariable %_ptr_Function_v3float Function %param_12 = OpVariable %_ptr_Function_v3float Function %param_13 = OpVariable %_ptr_Function_v3float Function %param_14 = OpVariable %_ptr_Function_v3float Function %param_15 = OpVariable %_ptr_Function_v3float Function %param_16 = OpVariable %_ptr_Function_float Function %param_17 = OpVariable %_ptr_Function_float Function %param_18 = OpVariable %_ptr_Function_v3float Function %param_19 = OpVariable %_ptr_Function_float Function %param_20 = OpVariable %_ptr_Function_v3float Function %pcfFactor = OpVariable %_ptr_Function_float Function %param_21 = OpVariable %_ptr_Function_v3float Function %param_22 = OpVariable %_ptr_Function_mat4v4float Function %zTile = OpVariable %_ptr_Function_uint Function %tileSize = OpVariable %_ptr_Function_v2float Function %virtualScreenCoord = OpVariable %_ptr_Function_v2float Function %tile = OpVariable %_ptr_Function_v3uint Function %tileIndex = OpVariable %_ptr_Function_uint Function %nPointLights = OpVariable %_ptr_Function_uint Function %i_1 = OpVariable %_ptr_Function_uint Function %lightIndex = OpVariable %_ptr_Function_uint Function %light_1 = OpVariable %_ptr_Function_PointLight Function %toLight = OpVariable %_ptr_Function_v3float Function %dist_0 = OpVariable %_ptr_Function_float Function %result = OpVariable %_ptr_Function_v3float Function %param_23 = OpVariable %_ptr_Function_float Function %param_24 = OpVariable %_ptr_Function_v3float Function %param_25 = OpVariable %_ptr_Function_v3float Function %param_26 = OpVariable %_ptr_Function_v3float Function %param_27 = OpVariable %_ptr_Function_v3float Function %param_28 = OpVariable %_ptr_Function_float Function %param_29 = OpVariable %_ptr_Function_float Function %param_30 = OpVariable %_ptr_Function_v3float Function %param_31 = OpVariable %_ptr_Function_float Function %param_32 = OpVariable %_ptr_Function_v3float Function %pcfFactor_0 = OpVariable %_ptr_Function_float Function %shadowPos = OpVariable %_ptr_Function_v3float Function %shadowDistance = OpVariable %_ptr_Function_float Function %shadowDir = OpVariable %_ptr_Function_v3float Function %projectedDistance = OpVariable %_ptr_Function_float Function %nearClip = OpVariable %_ptr_Function_float Function %a_0 = OpVariable %_ptr_Function_float Function %b = OpVariable %_ptr_Function_float Function %z = OpVariable %_ptr_Function_float Function %dbDistance = OpVariable %_ptr_Function_float Function %nSpotLights = OpVariable %_ptr_Function_uint Function %i_2 = OpVariable %_ptr_Function_uint Function %lightIndex_0 = OpVariable %_ptr_Function_uint Function %light_2 = OpVariable %_ptr_Function_SpotLight Function %position = OpVariable %_ptr_Function_v4float Function %toLight_0 = OpVariable %_ptr_Function_v3float Function %dist_1 = OpVariable %_ptr_Function_float Function %coneDotFactor = OpVariable %_ptr_Function_float Function %rotScaleOnly = OpVariable %_ptr_Function_mat3v3float Function %forward = OpVariable %_ptr_Function_v3float Function %pixelAngle = OpVariable %_ptr_Function_float Function %result_0 = OpVariable %_ptr_Function_v3float Function %param_33 = OpVariable %_ptr_Function_float Function %param_34 = OpVariable %_ptr_Function_v3float Function %param_35 = OpVariable %_ptr_Function_v3float Function %param_36 = OpVariable %_ptr_Function_v3float Function %param_37 = OpVariable %_ptr_Function_v3float Function %param_38 = OpVariable %_ptr_Function_float Function %param_39 = OpVariable %_ptr_Function_float Function %param_40 = OpVariable %_ptr_Function_v3float Function %param_41 = OpVariable %_ptr_Function_float Function %param_42 = OpVariable %_ptr_Function_v3float Function %pcfFactor_1 = OpVariable %_ptr_Function_float Function %param_43 = OpVariable %_ptr_Function_v3float Function %param_44 = OpVariable %_ptr_Function_mat4v4float Function %903 = OpExtInst %void %1 DebugScope %254 %904 = OpExtInst %void %1 DebugLine %245 %uint_72 %uint_72 %uint_0 %uint_0 %902 = OpExtInst %void %1 DebugFunctionDefinition %254 %main %909 = OpExtInst %void %1 DebugLine %245 %uint_74 %uint_74 %uint_0 %uint_0 %908 = OpExtInst %void %1 DebugDeclare %906 %user_out %102 %910 = OpFunctionCall %LitOutput %frag_ OpStore %user_out %910 %918 = OpExtInst %void %1 DebugLine %245 %uint_75 %uint_75 %uint_0 %uint_0 OpStore %outcolor %917 %924 = OpExtInst %void %1 DebugLine %245 %uint_76 %uint_76 %uint_0 %uint_0 %923 = OpAccessChain %_ptr_Function_v3float %user_out %int_1 %925 = OpLoad %v3float %923 %926 = OpCompositeExtract %float %925 0 %927 = OpCompositeExtract %float %925 1 %928 = OpCompositeExtract %float %925 2 %929 = OpCompositeConstruct %v4float %926 %927 %928 %float_1 OpStore %outnormal %929 %937 = OpExtInst %void %1 DebugLine %245 %uint_81 %uint_81 %uint_0 %uint_0 %936 = OpExtInst %void %1 DebugDeclare %933 %i %102 OpStore %i %uint_0 OpBranch %938 %938 = OpLabel %942 = OpExtInst %void %1 DebugScope %254 %943 = OpExtInst %void %1 DebugLine %245 %uint_81 %uint_81 %uint_0 %uint_0 OpLoopMerge %940 %941 None OpBranch %944 %944 = OpLabel %946 = OpExtInst %void %1 DebugScope %254 %947 = OpExtInst %void %1 DebugLine %245 %uint_81 %uint_81 %uint_0 %uint_0 %945 = OpLoad %uint %i %984 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 %int_0 %int_6 %985 = OpLoad %uint %984 %986 = OpULessThan %bool %945 %985 OpBranchConditional %986 %939 %940 %939 = OpLabel %1001 = OpExtInst %void %1 DebugScope %254 %1002 = OpExtInst %void %1 DebugLine %245 %uint_82 %uint_82 %uint_0 %uint_0 %1000 = OpExtInst %void %1 DebugDeclare %998 %light %102 %1019 = OpLoad %uint %i %1022 = OpAccessChain %_ptr_StorageBuffer_AmbientLightData_0 %__0 %int_0 %1019 %1023 = OpLoad %AmbientLightData_0 %1022 %1024 = OpCopyLogical %AmbientLightData %1023 OpStore %light %1024 %1029 = OpExtInst %void %1 DebugLine %245 %uint_84 %uint_84 %uint_0 %uint_0 %1028 = OpExtInst %void %1 DebugDeclare %1026 %ao %102 OpStore %ao %float_1 %1031 = OpExtInst %void %1 DebugLine %245 %uint_91 %uint_91 %uint_0 %uint_0 %1030 = OpAccessChain %_ptr_Function_v4float %user_out %int_0 %1033 = OpLoad %v4float %1030 %1034 = OpAccessChain %_ptr_Function_v3float %light %int_0 %1035 = OpLoad %v3float %1034 %1036 = OpCompositeExtract %float %1035 0 %1037 = OpCompositeExtract %float %1035 1 %1038 = OpCompositeExtract %float %1035 2 %1039 = OpCompositeConstruct %v4float %1036 %1037 %1038 %float_1 %1040 = OpFMul %v4float %1033 %1039 %1041 = OpAccessChain %_ptr_Function_float %light %int_1 %1042 = OpLoad %float %1041 %1043 = OpVectorTimesScalar %v4float %1040 %1042 %1044 = OpLoad %float %ao %1045 = OpVectorTimesScalar %v4float %1043 %1044 %1046 = OpLoad %v4float %outcolor %1047 = OpFAdd %v4float %1046 %1045 OpStore %outcolor %1047 OpBranch %941 %941 = OpLabel %1049 = OpExtInst %void %1 DebugScope %254 %1050 = OpExtInst %void %1 DebugLine %245 %uint_81 %uint_81 %uint_0 %uint_0 %1048 = OpLoad %uint %i %1051 = OpIAdd %uint %1048 %int_1 OpStore %i %1051 OpBranch %938 %940 = OpLabel %1056 = OpExtInst %void %1 DebugScope %254 %1057 = OpExtInst %void %1 DebugLine %245 %uint_96 %uint_96 %uint_0 %uint_0 %1055 = OpExtInst %void %1 DebugDeclare %1053 %i_0 %102 OpStore %i_0 %uint_0 OpBranch %1058 %1058 = OpLabel %1062 = OpExtInst %void %1 DebugScope %254 %1063 = OpExtInst %void %1 DebugLine %245 %uint_96 %uint_96 %uint_0 %uint_0 OpLoopMerge %1060 %1061 None OpBranch %1064 %1064 = OpLabel %1066 = OpExtInst %void %1 DebugScope %254 %1067 = OpExtInst %void %1 DebugLine %245 %uint_96 %uint_96 %uint_0 %uint_0 %1065 = OpLoad %uint %i_0 %1069 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 %int_0 %int_7 %1070 = OpLoad %uint %1069 %1071 = OpULessThan %bool %1065 %1070 OpBranchConditional %1071 %1059 %1060 %1059 = OpLabel %1093 = OpExtInst %void %1 DebugScope %254 %1094 = OpExtInst %void %1 DebugLine %245 %uint_97 %uint_97 %uint_0 %uint_0 %1092 = OpExtInst %void %1 DebugDeclare %1091 %light_0 %102 %1114 = OpLoad %uint %i_0 %1117 = OpAccessChain %_ptr_StorageBuffer_DirectionalLightData_0 %__1 %int_0 %1114 %1118 = OpLoad %DirectionalLightData_0 %1117 %1119 = OpCopyLogical %DirectionalLightData %1118 OpStore %light_0 %1119 %1125 = OpExtInst %void %1 DebugLine %245 %uint_98 %uint_98 %uint_0 %uint_0 %1124 = OpExtInst %void %1 DebugDeclare %1121 %lightResult %102 %1129 = OpAccessChain %_ptr_Function_v3float %light_0 %int_1 %1130 = OpLoad %v3float %1129 %1131 = OpAccessChain %_ptr_Function_float %light_0 %int_3 %1132 = OpLoad %float %1131 %1133 = OpVectorTimesScalar %v3float %1130 %1132 %1135 = OpAccessChain %_ptr_Function_v3float %user_out %int_1 %1136 = OpLoad %v3float %1135 OpStore %param_12 %1136 %1140 = OpAccessChain %_ptr_StorageBuffer_v3float %_ %int_0 %int_0 %int_4 %1141 = OpLoad %v3float %1140 OpStore %param_13 %1141 %1143 = OpLoad %v3float %worldPosition OpStore %param_14 %1143 %1145 = OpAccessChain %_ptr_Function_v4float %user_out %int_0 %1146 = OpLoad %v4float %1145 %1147 = OpVectorShuffle %v3float %1146 %1146 0 1 2 OpStore %param_15 %1147 %1149 = OpAccessChain %_ptr_Function_float %user_out %int_5 %1150 = OpLoad %float %1149 OpStore %param_16 %1150 %1152 = OpAccessChain %_ptr_Function_float %user_out %int_3 %1153 = OpLoad %float %1152 OpStore %param_17 %1153 %1155 = OpAccessChain %_ptr_Function_v3float %light_0 %int_2 %1156 = OpLoad %v3float %1155 OpStore %param_18 %1156 OpStore %param_19 %float_1 OpStore %param_20 %1133 %1159 = OpFunctionCall %v3float %CalculateLightRadiance_vf3_vf3_vf3_vf3_f1_f1_vf3_f1_vf3_ %param_12 %param_13 %param_14 %param_15 %param_16 %param_17 %param_18 %param_19 %param_20 OpStore %lightResult %1159 %1165 = OpExtInst %void %1 DebugLine %245 %uint_99 %uint_99 %uint_0 %uint_0 %1164 = OpExtInst %void %1 DebugDeclare %1161 %pcfFactor %102 OpStore %pcfFactor %float_1 %1169 = OpExtInst %void %1 DebugLine %245 %uint_101 %uint_101 %uint_0 %uint_0 %1168 = OpAccessChain %_ptr_Function_int %light_0 %int_4 %1171 = OpLoad %int %1168 %1172 = OpINotEqual %bool %1171 %uint_0 OpSelectionMerge %1174 None OpBranchConditional %1172 %1173 %1174 %1173 = OpLabel %1187 = OpExtInst %void %1 DebugScope %254 %1188 = OpExtInst %void %1 DebugLine %245 %uint_102 %uint_102 %uint_0 %uint_0 %1186 = OpAccessChain %_ptr_Function_int %light_0 %int_5 %1189 = OpLoad %int %1186 %1191 = OpLoad %v3float %worldPosition OpStore %param_21 %1191 %1193 = OpAccessChain %_ptr_Function_mat4v4float %light_0 %int_0 %1194 = OpLoad %mat4v4float %1193 OpStore %param_22 %1194 %1195 = OpAccessChain %_ptr_UniformConstant_83 %shadowMaps %1189 %1196 = OpFunctionCall %float %pcfForShadow_vf3_mf44_p1_t21_ %param_21 %param_22 %shadowSampler_0 %1195 OpStore %pcfFactor %1196 OpBranch %1174 %1174 = OpLabel %1198 = OpExtInst %void %1 DebugScope %254 %1199 = OpExtInst %void %1 DebugLine %245 %uint_105 %uint_105 %uint_0 %uint_0 %1197 = OpLoad %v3float %lightResult %1201 = OpAccessChain %_ptr_Function_float %user_out %int_6 %1202 = OpLoad %float %1201 %1203 = OpVectorTimesScalar %v3float %1197 %1202 %1204 = OpLoad %float %pcfFactor %1205 = OpVectorTimesScalar %v3float %1203 %1204 %1206 = OpCompositeExtract %float %1205 0 %1207 = OpCompositeExtract %float %1205 1 %1208 = OpCompositeExtract %float %1205 2 %1209 = OpCompositeConstruct %v4float %1206 %1207 %1208 %float_0 %1210 = OpLoad %v4float %outcolor %1211 = OpFAdd %v4float %1210 %1209 OpStore %outcolor %1211 OpBranch %1061 %1061 = OpLabel %1213 = OpExtInst %void %1 DebugScope %254 %1214 = OpExtInst %void %1 DebugLine %245 %uint_96 %uint_96 %uint_0 %uint_0 %1212 = OpLoad %uint %i_0 %1215 = OpIAdd %uint %1212 %int_1 OpStore %i_0 %1215 OpBranch %1058 %1060 = OpLabel %1221 = OpExtInst %void %1 DebugScope %254 %1222 = OpExtInst %void %1 DebugLine %245 %uint_110 %uint_110 %uint_0 %uint_0 %1220 = OpExtInst %void %1 DebugDeclare %1217 %zTile %102 %1228 = OpAccessChain %_ptr_Input_float %viewPosition %uint_2 %1229 = OpLoad %float %1228 %1230 = OpExtInst %float %11 FAbs %1229 %1234 = OpAccessChain %_ptr_StorageBuffer_float %_ %int_0 %int_0 %int_9 %1235 = OpLoad %float %1234 %1236 = OpFDiv %float %1230 %1235 %1237 = OpExtInst %float %11 Log %1236 %1238 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 %int_0 %int_5 %uint_2 %1239 = OpLoad %uint %1238 %1240 = OpConvertUToF %float %1239 %1241 = OpFMul %float %1237 %1240 %1243 = OpAccessChain %_ptr_StorageBuffer_float %_ %int_0 %int_0 %int_8 %1244 = OpLoad %float %1243 %1245 = OpAccessChain %_ptr_StorageBuffer_float %_ %int_0 %int_0 %int_9 %1246 = OpLoad %float %1245 %1247 = OpFDiv %float %1244 %1246 %1248 = OpExtInst %float %11 Log %1247 %1249 = OpFDiv %float %1241 %1248 %1250 = OpConvertFToU %uint %1249 OpStore %zTile %1250 %1258 = OpExtInst %void %1 DebugLine %245 %uint_111 %uint_111 %uint_0 %uint_0 %1257 = OpExtInst %void %1 DebugDeclare %1254 %tileSize %102 %1263 = OpAccessChain %_ptr_StorageBuffer_v4uint %_ %int_0 %int_0 %int_3 %1264 = OpLoad %v4uint %1263 %1265 = OpVectorShuffle %v2uint %1264 %1264 2 3 %1268 = OpAccessChain %_ptr_StorageBuffer_v3uint %_ %int_0 %int_0 %int_5 %1269 = OpLoad %v3uint %1268 %1270 = OpVectorShuffle %v2uint %1269 %1269 0 1 %1271 = OpUDiv %v2uint %1265 %1270 %1272 = OpConvertUToF %v2float %1271 OpStore %tileSize %1272 %1278 = OpExtInst %void %1 DebugLine %245 %uint_113 %uint_113 %uint_0 %uint_0 %1277 = OpExtInst %void %1 DebugDeclare %1274 %virtualScreenCoord %102 %1284 = OpLoad %v4float %gl_FragCoord %1285 = OpVectorShuffle %v2float %1284 %1284 0 1 %1286 = OpAccessChain %_ptr_StorageBuffer_v4uint %_ %int_0 %int_0 %int_3 %1287 = OpLoad %v4uint %1286 %1288 = OpVectorShuffle %v2uint %1287 %1287 0 1 %1289 = OpConvertUToF %v2float %1288 %1290 = OpFSub %v2float %1285 %1289 OpStore %virtualScreenCoord %1290 %1298 = OpExtInst %void %1 DebugLine %245 %uint_115 %uint_115 %uint_0 %uint_0 %1297 = OpExtInst %void %1 DebugDeclare %1294 %tile %102 %1299 = OpLoad %v2float %virtualScreenCoord %1300 = OpLoad %v2float %tileSize %1301 = OpFDiv %v2float %1299 %1300 %1302 = OpConvertFToU %v2uint %1301 %1303 = OpLoad %uint %zTile %1304 = OpCompositeExtract %uint %1302 0 %1305 = OpCompositeExtract %uint %1302 1 %1306 = OpCompositeConstruct %v3uint %1304 %1305 %1303 OpStore %tile %1306 %1312 = OpExtInst %void %1 DebugLine %245 %uint_116 %uint_116 %uint_0 %uint_0 %1311 = OpExtInst %void %1 DebugDeclare %1308 %tileIndex %102 %1313 = OpAccessChain %_ptr_Function_uint %tile %uint_0 %1314 = OpLoad %uint %1313 %1315 = OpAccessChain %_ptr_Function_uint %tile %uint_1 %1316 = OpLoad %uint %1315 %1317 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 %int_0 %int_5 %uint_0 %1318 = OpLoad %uint %1317 %1319 = OpIMul %uint %1316 %1318 %1320 = OpIAdd %uint %1314 %1319 %1321 = OpAccessChain %_ptr_Function_uint %tile %uint_2 %1322 = OpLoad %uint %1321 %1323 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 %int_0 %int_5 %uint_0 %1324 = OpLoad %uint %1323 %1325 = OpIMul %uint %1322 %1324 %1326 = OpAccessChain %_ptr_StorageBuffer_uint %_ %int_0 %int_0 %int_5 %uint_1 %1327 = OpLoad %uint %1326 %1328 = OpIMul %uint %1325 %1327 %1329 = OpIAdd %uint %1320 %1328 OpStore %tileIndex %1329 %1335 = OpExtInst %void %1 DebugLine %245 %uint_120 %uint_120 %uint_0 %uint_0 %1334 = OpExtInst %void %1 DebugDeclare %1331 %nPointLights %102 %1365 = OpLoad %uint %tileIndex %1366 = OpAccessChain %_ptr_StorageBuffer_uint %__2 %int_0 %1365 %int_2 %1367 = OpLoad %uint %1366 OpStore %nPointLights %1367 %1372 = OpExtInst %void %1 DebugLine %245 %uint_123 %uint_123 %uint_0 %uint_0 %1371 = OpExtInst %void %1 DebugDeclare %1369 %i_1 %102 OpStore %i_1 %uint_0 OpBranch %1373 %1373 = OpLabel %1377 = OpExtInst %void %1 DebugScope %254 %1378 = OpExtInst %void %1 DebugLine %245 %uint_123 %uint_123 %uint_0 %uint_0 OpLoopMerge %1375 %1376 None OpBranch %1379 %1379 = OpLabel %1381 = OpExtInst %void %1 DebugScope %254 %1382 = OpExtInst %void %1 DebugLine %245 %uint_123 %uint_123 %uint_0 %uint_0 %1380 = OpLoad %uint %i_1 %1383 = OpLoad %uint %nPointLights %1384 = OpULessThan %bool %1380 %1383 %1385 = OpLoad %uint %i_1 %1386 = OpULessThan %bool %1385 %uint_16 %1387 = OpLogicalAnd %bool %1384 %1386 OpBranchConditional %1387 %1374 %1375 %1374 = OpLabel %1393 = OpExtInst %void %1 DebugScope %254 %1394 = OpExtInst %void %1 DebugLine %245 %uint_124 %uint_124 %uint_0 %uint_0 %1392 = OpExtInst %void %1 DebugDeclare %1389 %lightIndex %102 %1395 = OpLoad %uint %tileIndex %1396 = OpLoad %uint %i_1 %1397 = OpAccessChain %_ptr_StorageBuffer_uint %__2 %int_0 %1395 %int_4 %1396 %1398 = OpLoad %uint %1397 OpStore %lightIndex %1398 %1414 = OpExtInst %void %1 DebugLine %245 %uint_125 %uint_125 %uint_0 %uint_0 %1413 = OpExtInst %void %1 DebugDeclare %1412 %light_1 %102 %1434 = OpLoad %uint %lightIndex %1437 = OpAccessChain %_ptr_StorageBuffer_PointLight_0 %__3 %int_0 %1434 %1438 = OpLoad %PointLight_0 %1437 %1439 = OpCopyLogical %PointLight %1438 OpStore %light_1 %1439 %1444 = OpExtInst %void %1 DebugLine %245 %uint_127 %uint_127 %uint_0 %uint_0 %1443 = OpExtInst %void %1 DebugDeclare %1441 %toLight %102 %1445 = OpAccessChain %_ptr_Function_v3float %light_1 %int_0 %1446 = OpLoad %v3float %1445 %1447 = OpLoad %v3float %worldPosition %1448 = OpFSub %v3float %1446 %1447 %1449 = OpExtInst %v3float %11 Normalize %1448 OpStore %toLight %1449 %1454 = OpExtInst %void %1 DebugLine %245 %uint_129 %uint_129 %uint_0 %uint_0 %1453 = OpExtInst %void %1 DebugDeclare %1451 %dist_0 %102 %1455 = OpLoad %v3float %worldPosition %1456 = OpAccessChain %_ptr_Function_v3float %light_1 %int_0 %1457 = OpLoad %v3float %1456 %1458 = OpExtInst %float %11 Distance %1455 %1457 OpStore %dist_0 %1458 %1464 = OpExtInst %void %1 DebugLine %245 %uint_131 %uint_131 %uint_0 %uint_0 %1463 = OpExtInst %void %1 DebugDeclare %1460 %result %102 %1466 = OpLoad %float %dist_0 OpStore %param_23 %1466 %1467 = OpFunctionCall %float %getLightAttenuation_f1_ %param_23 %1468 = OpAccessChain %_ptr_Function_v3float %light_1 %int_1 %1469 = OpLoad %v3float %1468 %1470 = OpAccessChain %_ptr_Function_float %light_1 %int_2 %1471 = OpLoad %float %1470 %1472 = OpVectorTimesScalar %v3float %1469 %1471 %1474 = OpAccessChain %_ptr_Function_v3float %user_out %int_1 %1475 = OpLoad %v3float %1474 OpStore %param_24 %1475 %1477 = OpAccessChain %_ptr_StorageBuffer_v3float %_ %int_0 %int_0 %int_4 %1478 = OpLoad %v3float %1477 OpStore %param_25 %1478 %1480 = OpLoad %v3float %worldPosition OpStore %param_26 %1480 %1482 = OpAccessChain %_ptr_Function_v4float %user_out %int_0 %1483 = OpLoad %v4float %1482 %1484 = OpVectorShuffle %v3float %1483 %1483 0 1 2 OpStore %param_27 %1484 %1486 = OpAccessChain %_ptr_Function_float %user_out %int_5 %1487 = OpLoad %float %1486 OpStore %param_28 %1487 %1489 = OpAccessChain %_ptr_Function_float %user_out %int_3 %1490 = OpLoad %float %1489 OpStore %param_29 %1490 %1492 = OpLoad %v3float %toLight OpStore %param_30 %1492 OpStore %param_31 %1467 OpStore %param_32 %1472 %1495 = OpFunctionCall %v3float %CalculateLightRadiance_vf3_vf3_vf3_vf3_f1_f1_vf3_f1_vf3_ %param_24 %param_25 %param_26 %param_27 %param_28 %param_29 %param_30 %param_31 %param_32 OpStore %result %1495 %1500 = OpExtInst %void %1 DebugLine %245 %uint_132 %uint_132 %uint_0 %uint_0 %1499 = OpExtInst %void %1 DebugDeclare %1497 %pcfFactor_0 %102 OpStore %pcfFactor_0 %float_1 %1502 = OpExtInst %void %1 DebugLine %245 %uint_134 %uint_134 %uint_0 %uint_0 %1501 = OpAccessChain %_ptr_Function_int %light_1 %int_3 %1504 = OpLoad %int %1501 %1505 = OpINotEqual %bool %1504 %uint_0 OpSelectionMerge %1507 None OpBranchConditional %1505 %1506 %1507 %1506 = OpLabel %1513 = OpExtInst %void %1 DebugScope %254 %1514 = OpExtInst %void %1 DebugLine %245 %uint_136 %uint_136 %uint_0 %uint_0 %1512 = OpExtInst %void %1 DebugDeclare %1509 %shadowPos %102 %1515 = OpLoad %v3float %worldPosition %1516 = OpAccessChain %_ptr_Function_v3float %light_1 %int_0 %1517 = OpLoad %v3float %1516 %1518 = OpFSub %v3float %1515 %1517 OpStore %shadowPos %1518 %1524 = OpExtInst %void %1 DebugLine %245 %uint_137 %uint_137 %uint_0 %uint_0 %1523 = OpExtInst %void %1 DebugDeclare %1520 %shadowDistance %102 %1525 = OpLoad %v3float %shadowPos %1526 = OpExtInst %float %11 Length %1525 OpStore %shadowDistance %1526 %1532 = OpExtInst %void %1 DebugLine %245 %uint_138 %uint_138 %uint_0 %uint_0 %1531 = OpExtInst %void %1 DebugDeclare %1528 %shadowDir %102 %1533 = OpLoad %v3float %shadowPos %1534 = OpExtInst %v3float %11 Normalize %1533 OpStore %shadowDir %1534 %1540 = OpExtInst %void %1 DebugLine %245 %uint_140 %uint_140 %uint_0 %uint_0 %1539 = OpExtInst %void %1 DebugDeclare %1536 %projectedDistance %102 %1541 = OpAccessChain %_ptr_Function_float %shadowPos %uint_0 %1542 = OpLoad %float %1541 %1543 = OpExtInst %float %11 FAbs %1542 %1544 = OpAccessChain %_ptr_Function_float %shadowPos %uint_1 %1545 = OpLoad %float %1544 %1546 = OpExtInst %float %11 FAbs %1545 %1547 = OpExtInst %float %11 FMax %1543 %1546 %1548 = OpAccessChain %_ptr_Function_float %shadowPos %uint_2 %1549 = OpLoad %float %1548 %1550 = OpExtInst %float %11 FAbs %1549 %1551 = OpExtInst %float %11 FMax %1547 %1550 OpStore %projectedDistance %1551 %1557 = OpExtInst %void %1 DebugLine %245 %uint_142 %uint_142 %uint_0 %uint_0 %1556 = OpExtInst %void %1 DebugDeclare %1553 %nearClip %102 %1558 = OpAccessChain %_ptr_StorageBuffer_float %_ %int_0 %int_0 %int_8 %1559 = OpLoad %float %1558 OpStore %nearClip %1559 %1564 = OpExtInst %void %1 DebugLine %245 %uint_143 %uint_143 %uint_0 %uint_0 %1563 = OpExtInst %void %1 DebugDeclare %1561 %a_0 %102 OpStore %a_0 %float_0 %1570 = OpExtInst %void %1 DebugLine %245 %uint_144 %uint_144 %uint_0 %uint_0 %1569 = OpExtInst %void %1 DebugDeclare %1566 %b %102 %1571 = OpLoad %float %nearClip OpStore %b %1571 %1577 = OpExtInst %void %1 DebugLine %245 %uint_145 %uint_145 %uint_0 %uint_0 %1576 = OpExtInst %void %1 DebugDeclare %1573 %z %102 %1578 = OpLoad %float %projectedDistance %1579 = OpLoad %float %a_0 %1580 = OpFMul %float %1578 %1579 %1581 = OpLoad %float %b %1582 = OpFAdd %float %1580 %1581 OpStore %z %1582 %1588 = OpExtInst %void %1 DebugLine %245 %uint_146 %uint_146 %uint_0 %uint_0 %1587 = OpExtInst %void %1 DebugDeclare %1584 %dbDistance %102 %1589 = OpLoad %float %z %1590 = OpLoad %float %projectedDistance %1591 = OpFDiv %float %1589 %1590 OpStore %dbDistance %1591 %1605 = OpExtInst %void %1 DebugLine %245 %uint_148 %uint_148 %uint_0 %uint_0 %1604 = OpAccessChain %_ptr_Function_uint %light_1 %int_4 %1606 = OpLoad %uint %1604 %1609 = OpAccessChain %_ptr_UniformConstant_1592 %pointShadowMaps %1606 %1610 = OpLoad %1592 %1609 %1611 = OpLoad %73 %shadowSampler_0 %1616 = OpSampledImage %1614 %1610 %1611 %1617 = OpLoad %v3float %shadowDir %1618 = OpLoad %float %dbDistance %1619 = OpCompositeExtract %float %1617 0 %1620 = OpCompositeExtract %float %1617 1 %1621 = OpCompositeExtract %float %1617 2 %1622 = OpCompositeConstruct %v4float %1619 %1620 %1621 %1618 %1623 = OpCompositeExtract %float %1622 3 %1624 = OpImageSampleDrefImplicitLod %float %1616 %1622 %1623 OpStore %pcfFactor_0 %1624 OpBranch %1507 %1507 = OpLabel %1626 = OpExtInst %void %1 DebugScope %254 %1627 = OpExtInst %void %1 DebugLine %245 %uint_151 %uint_151 %uint_0 %uint_0 %1625 = OpLoad %v3float %result %1629 = OpAccessChain %_ptr_Function_float %user_out %int_6 %1630 = OpLoad %float %1629 %1631 = OpVectorTimesScalar %v3float %1625 %1630 %1632 = OpLoad %float %pcfFactor_0 %1633 = OpVectorTimesScalar %v3float %1631 %1632 %1634 = OpCompositeExtract %float %1633 0 %1635 = OpCompositeExtract %float %1633 1 %1636 = OpCompositeExtract %float %1633 2 %1637 = OpCompositeConstruct %v4float %1634 %1635 %1636 %float_0 %1638 = OpLoad %v4float %outcolor %1639 = OpFAdd %v4float %1638 %1637 OpStore %outcolor %1639 OpBranch %1376 %1376 = OpLabel %1641 = OpExtInst %void %1 DebugScope %254 %1642 = OpExtInst %void %1 DebugLine %245 %uint_123 %uint_123 %uint_0 %uint_0 %1640 = OpLoad %uint %i_1 %1643 = OpIAdd %uint %1640 %int_1 OpStore %i_1 %1643 OpBranch %1373 %1375 = OpLabel %1649 = OpExtInst %void %1 DebugScope %254 %1650 = OpExtInst %void %1 DebugLine %245 %uint_155 %uint_155 %uint_0 %uint_0 %1648 = OpExtInst %void %1 DebugDeclare %1645 %nSpotLights %102 %1651 = OpLoad %uint %tileIndex %1652 = OpAccessChain %_ptr_StorageBuffer_uint %__2 %int_0 %1651 %int_3 %1653 = OpLoad %uint %1652 OpStore %nSpotLights %1653 %1658 = OpExtInst %void %1 DebugLine %245 %uint_156 %uint_156 %uint_0 %uint_0 %1657 = OpExtInst %void %1 DebugDeclare %1655 %i_2 %102 OpStore %i_2 %uint_0 OpBranch %1659 %1659 = OpLabel %1663 = OpExtInst %void %1 DebugScope %254 %1664 = OpExtInst %void %1 DebugLine %245 %uint_156 %uint_156 %uint_0 %uint_0 OpLoopMerge %1661 %1662 None OpBranch %1665 %1665 = OpLabel %1667 = OpExtInst %void %1 DebugScope %254 %1668 = OpExtInst %void %1 DebugLine %245 %uint_156 %uint_156 %uint_0 %uint_0 %1666 = OpLoad %uint %i_2 %1669 = OpLoad %uint %nSpotLights %1670 = OpULessThan %bool %1666 %1669 %1671 = OpLoad %uint %i_2 %1672 = OpULessThan %bool %1671 %uint_16 %1673 = OpLogicalAnd %bool %1670 %1672 OpBranchConditional %1673 %1660 %1661 %1660 = OpLabel %1678 = OpExtInst %void %1 DebugScope %254 %1679 = OpExtInst %void %1 DebugLine %245 %uint_157 %uint_157 %uint_0 %uint_0 %1677 = OpExtInst %void %1 DebugDeclare %1675 %lightIndex_0 %102 %1680 = OpLoad %uint %tileIndex %1681 = OpLoad %uint %i_2 %1682 = OpAccessChain %_ptr_StorageBuffer_uint %__2 %int_0 %1680 %int_5 %1681 %1683 = OpLoad %uint %1682 OpStore %lightIndex_0 %1683 %1703 = OpExtInst %void %1 DebugLine %245 %uint_158 %uint_158 %uint_0 %uint_0 %1702 = OpExtInst %void %1 DebugDeclare %1701 %light_2 %102 %1725 = OpLoad %uint %lightIndex_0 %1728 = OpAccessChain %_ptr_StorageBuffer_SpotLight_0 %__4 %int_0 %1725 %1729 = OpLoad %SpotLight_0 %1728 %1730 = OpCopyLogical %SpotLight %1729 OpStore %light_2 %1730 %1736 = OpExtInst %void %1 DebugLine %245 %uint_160 %uint_160 %uint_0 %uint_0 %1735 = OpExtInst %void %1 DebugDeclare %1732 %position %102 %1737 = OpAccessChain %_ptr_Function_mat4v4float %light_2 %int_1 %1738 = OpLoad %mat4v4float %1737 %1740 = OpMatrixTimesVector %v4float %1738 %1739 OpStore %position %1740 %1745 = OpExtInst %void %1 DebugLine %245 %uint_162 %uint_162 %uint_0 %uint_0 %1744 = OpExtInst %void %1 DebugDeclare %1742 %toLight_0 %102 %1746 = OpLoad %v4float %position %1747 = OpVectorShuffle %v3float %1746 %1746 0 1 2 %1748 = OpLoad %v3float %worldPosition %1749 = OpFSub %v3float %1747 %1748 %1750 = OpExtInst %v3float %11 Normalize %1749 OpStore %toLight_0 %1750 %1755 = OpExtInst %void %1 DebugLine %245 %uint_164 %uint_164 %uint_0 %uint_0 %1754 = OpExtInst %void %1 DebugDeclare %1752 %dist_1 %102 %1756 = OpLoad %v3float %worldPosition %1757 = OpLoad %v4float %position %1758 = OpVectorShuffle %v3float %1757 %1757 0 1 2 %1759 = OpExtInst %float %11 Distance %1756 %1758 OpStore %dist_1 %1759 %1765 = OpExtInst %void %1 DebugLine %245 %uint_167 %uint_167 %uint_0 %uint_0 %1764 = OpExtInst %void %1 DebugDeclare %1761 %coneDotFactor %102 %1766 = OpAccessChain %_ptr_Function_float %light_2 %int_4 %1767 = OpLoad %float %1766 %1768 = OpExtInst %float %11 Radians %1767 %1769 = OpExtInst %float %11 Cos %1768 OpStore %coneDotFactor %1769 %1775 = OpExtInst %void %1 DebugLine %245 %uint_168 %uint_168 %uint_0 %uint_0 %1774 = OpExtInst %void %1 DebugDeclare %1771 %rotScaleOnly %102 %1776 = OpAccessChain %_ptr_Function_mat4v4float %light_2 %int_1 %1777 = OpLoad %mat4v4float %1776 %1778 = OpCompositeExtract %v4float %1777 0 %1779 = OpVectorShuffle %v3float %1778 %1778 0 1 2 %1780 = OpCompositeExtract %v4float %1777 1 %1781 = OpVectorShuffle %v3float %1780 %1780 0 1 2 %1782 = OpCompositeExtract %v4float %1777 2 %1783 = OpVectorShuffle %v3float %1782 %1782 0 1 2 %1784 = OpCompositeConstruct %mat3v3float %1779 %1781 %1783 OpStore %rotScaleOnly %1784 %1790 = OpExtInst %void %1 DebugLine %245 %uint_169 %uint_169 %uint_0 %uint_0 %1789 = OpExtInst %void %1 DebugDeclare %1786 %forward %102 %1791 = OpLoad %mat3v3float %rotScaleOnly %1794 = OpMatrixTimesVector %v3float %1791 %1793 %1795 = OpExtInst %v3float %11 Normalize %1794 OpStore %forward %1795 %1801 = OpExtInst %void %1 DebugLine %245 %uint_171 %uint_171 %uint_0 %uint_0 %1800 = OpExtInst %void %1 DebugDeclare %1797 %pixelAngle %102 %1802 = OpLoad %v3float %forward %1803 = OpFNegate %v3float %1802 %1804 = OpLoad %v3float %toLight_0 %1805 = OpDot %float %1803 %1804 OpStore %pixelAngle %1805 %1810 = OpExtInst %void %1 DebugLine %245 %uint_173 %uint_173 %uint_0 %uint_0 %1809 = OpExtInst %void %1 DebugDeclare %1807 %result_0 %102 %1812 = OpLoad %float %dist_1 OpStore %param_33 %1812 %1813 = OpFunctionCall %float %getLightAttenuation_f1_ %param_33 %1814 = OpAccessChain %_ptr_Function_v3float %light_2 %int_2 %1815 = OpLoad %v3float %1814 %1816 = OpAccessChain %_ptr_Function_float %light_2 %int_3 %1817 = OpLoad %float %1816 %1818 = OpVectorTimesScalar %v3float %1815 %1817 %1820 = OpAccessChain %_ptr_Function_v3float %user_out %int_1 %1821 = OpLoad %v3float %1820 OpStore %param_34 %1821 %1823 = OpAccessChain %_ptr_StorageBuffer_v3float %_ %int_0 %int_0 %int_4 %1824 = OpLoad %v3float %1823 OpStore %param_35 %1824 %1826 = OpLoad %v3float %worldPosition OpStore %param_36 %1826 %1828 = OpAccessChain %_ptr_Function_v4float %user_out %int_0 %1829 = OpLoad %v4float %1828 %1830 = OpVectorShuffle %v3float %1829 %1829 0 1 2 OpStore %param_37 %1830 %1832 = OpAccessChain %_ptr_Function_float %user_out %int_5 %1833 = OpLoad %float %1832 OpStore %param_38 %1833 %1835 = OpAccessChain %_ptr_Function_float %user_out %int_3 %1836 = OpLoad %float %1835 OpStore %param_39 %1836 %1838 = OpLoad %v3float %toLight_0 OpStore %param_40 %1838 OpStore %param_41 %1813 OpStore %param_42 %1818 %1841 = OpFunctionCall %v3float %CalculateLightRadiance_vf3_vf3_vf3_vf3_f1_f1_vf3_f1_vf3_ %param_34 %param_35 %param_36 %param_37 %param_38 %param_39 %param_40 %param_41 %param_42 OpStore %result_0 %1841 %1846 = OpExtInst %void %1 DebugLine %245 %uint_175 %uint_175 %uint_0 %uint_0 %1845 = OpExtInst %void %1 DebugDeclare %1843 %pcfFactor_1 %102 OpStore %pcfFactor_1 %float_1 %1848 = OpExtInst %void %1 DebugLine %245 %uint_176 %uint_176 %uint_0 %uint_0 %1847 = OpAccessChain %_ptr_Function_int %light_2 %int_6 %1850 = OpLoad %int %1847 %1851 = OpINotEqual %bool %1850 %uint_0 OpSelectionMerge %1853 None OpBranchConditional %1851 %1852 %1853 %1852 = OpLabel %1855 = OpExtInst %void %1 DebugScope %254 %1856 = OpExtInst %void %1 DebugLine %245 %uint_177 %uint_177 %uint_0 %uint_0 %1854 = OpAccessChain %_ptr_Function_uint %light_2 %int_7 %1858 = OpLoad %uint %1854 %1860 = OpLoad %v3float %worldPosition OpStore %param_43 %1860 %1862 = OpAccessChain %_ptr_Function_mat4v4float %light_2 %int_0 %1863 = OpLoad %mat4v4float %1862 OpStore %param_44 %1863 %1864 = OpAccessChain %_ptr_UniformConstant_83 %shadowMaps %1858 %1865 = OpFunctionCall %float %pcfForShadow_vf3_mf44_p1_t21_ %param_43 %param_44 %shadowSampler_0 %1864 OpStore %pcfFactor_1 %1865 OpBranch %1853 %1853 = OpLabel %1867 = OpExtInst %void %1 DebugScope %254 %1868 = OpExtInst %void %1 DebugLine %245 %uint_180 %uint_180 %uint_0 %uint_0 %1866 = OpLoad %float %pcfFactor_1 %1870 = OpLoad %float %pixelAngle %1871 = OpLoad %float %coneDotFactor %1872 = OpFOrdGreaterThan %bool %1870 %1871 %1873 = OpSelect %int %1872 %int_1 %int_0 %1874 = OpConvertSToF %float %1873 %1875 = OpFMul %float %1866 %1874 OpStore %pcfFactor_1 %1875 %1877 = OpExtInst %void %1 DebugLine %245 %uint_182 %uint_182 %uint_0 %uint_0 %1876 = OpLoad %v3float %result_0 %1879 = OpAccessChain %_ptr_Function_float %user_out %int_6 %1880 = OpLoad %float %1879 %1881 = OpVectorTimesScalar %v3float %1876 %1880 %1882 = OpLoad %float %pcfFactor_1 %1883 = OpVectorTimesScalar %v3float %1881 %1882 %1884 = OpCompositeExtract %float %1883 0 %1885 = OpCompositeExtract %float %1883 1 %1886 = OpCompositeExtract %float %1883 2 %1887 = OpCompositeConstruct %v4float %1884 %1885 %1886 %float_0 %1888 = OpLoad %v4float %outcolor %1889 = OpFAdd %v4float %1888 %1887 OpStore %outcolor %1889 OpBranch %1662 %1662 = OpLabel %1891 = OpExtInst %void %1 DebugScope %254 %1892 = OpExtInst %void %1 DebugLine %245 %uint_156 %uint_156 %uint_0 %uint_0 %1890 = OpLoad %uint %i_2 %1893 = OpIAdd %uint %1890 %int_1 OpStore %i_2 %1893 OpBranch %1659 %1661 = OpLabel %1895 = OpExtInst %void %1 DebugScope %254 %1896 = OpExtInst %void %1 DebugLine %245 %uint_186 %uint_186 %uint_0 %uint_0 %1894 = OpAccessChain %_ptr_Function_v3float %user_out %int_2 %1898 = OpLoad %v3float %1894 %1899 = OpCompositeExtract %float %1898 0 %1900 = OpCompositeExtract %float %1898 1 %1901 = OpCompositeExtract %float %1898 2 %1902 = OpCompositeConstruct %v4float %1899 %1900 %1901 %float_0 %1903 = OpLoad %v4float %outcolor %1904 = OpFAdd %v4float %1903 %1902 OpStore %outcolor %1904 OpReturn OpFunctionEnd ; Function frag_ %frag_ = OpFunction %LitOutput None %56 %59 = OpLabel %mat_out = OpVariable %_ptr_Function_LitOutput Function %normal = OpVariable %_ptr_Function_v3float Function %TBN = OpVariable %_ptr_Function_mat3v3float Function %specular = OpVariable %_ptr_Function_float Function %metallic_0 = OpVariable %_ptr_Function_float Function %roughness_3 = OpVariable %_ptr_Function_float Function %257 = OpExtInst %void %1 DebugScope %61 %258 = OpExtInst %void %1 DebugLine %35 %uint_13 %uint_13 %uint_0 %uint_0 %256 = OpExtInst %void %1 DebugFunctionDefinition %61 %frag_ %266 = OpExtInst %void %1 DebugLine %35 %uint_17 %uint_17 %uint_0 %uint_0 %265 = OpExtInst %void %1 DebugDeclare %262 %mat_out %102 %274 = OpLoad %83 %t_diffuse %279 = OpLoad %73 %g_sampler %284 = OpSampledImage %280 %274 %279 %292 = OpLoad %v2float %inUV %293 = OpImageSampleImplicitLod %v4float %284 %292 %310 = OpAccessChain %_ptr_PushConstant_v4float %ubo %int_0 %311 = OpLoad %v4float %310 %312 = OpFMul %v4float %293 %311 %315 = OpAccessChain %_ptr_Function_v4float %mat_out %int_0 OpStore %315 %312 %321 = OpExtInst %void %1 DebugLine %35 %uint_18 %uint_18 %uint_0 %uint_0 %320 = OpExtInst %void %1 DebugDeclare %317 %normal %102 %325 = OpLoad %83 %t_normal %326 = OpLoad %73 %g_sampler %327 = OpSampledImage %280 %325 %326 %328 = OpLoad %v2float %inUV %329 = OpImageSampleImplicitLod %v4float %327 %328 %330 = OpVectorShuffle %v3float %329 %329 0 1 2 OpStore %normal %330 %332 = OpExtInst %void %1 DebugLine %35 %uint_19 %uint_19 %uint_0 %uint_0 %331 = OpLoad %v3float %normal %335 = OpVectorTimesScalar %v3float %331 %float_2 %337 = OpCompositeConstruct %v3float %float_1 %float_1 %float_1 %338 = OpFSub %v3float %335 %337 OpStore %normal %338 %348 = OpExtInst %void %1 DebugLine %35 %uint_21 %uint_21 %uint_0 %uint_0 %347 = OpExtInst %void %1 DebugDeclare %344 %TBN %102 %358 = OpAccessChain %_ptr_Input_v3float %inTBN %int_0 %359 = OpLoad %v3float %358 %361 = OpAccessChain %_ptr_Input_v3float %inTBN %int_1 %362 = OpLoad %v3float %361 %364 = OpAccessChain %_ptr_Input_v3float %inTBN %int_2 %365 = OpLoad %v3float %364 %367 = OpCompositeExtract %float %359 0 %368 = OpCompositeExtract %float %359 1 %369 = OpCompositeExtract %float %359 2 %370 = OpCompositeExtract %float %362 0 %371 = OpCompositeExtract %float %362 1 %372 = OpCompositeExtract %float %362 2 %373 = OpCompositeExtract %float %365 0 %374 = OpCompositeExtract %float %365 1 %375 = OpCompositeExtract %float %365 2 %376 = OpCompositeConstruct %v3float %367 %368 %369 %377 = OpCompositeConstruct %v3float %370 %371 %372 %378 = OpCompositeConstruct %v3float %373 %374 %375 %379 = OpCompositeConstruct %mat3v3float %376 %377 %378 OpStore %TBN %379 %381 = OpExtInst %void %1 DebugLine %35 %uint_22 %uint_22 %uint_0 %uint_0 %380 = OpLoad %mat3v3float %TBN %383 = OpLoad %v3float %normal %384 = OpMatrixTimesVector %v3float %380 %383 %385 = OpExtInst %v3float %11 Normalize %384 %386 = OpAccessChain %_ptr_Function_v3float %mat_out %int_1 OpStore %386 %385 %392 = OpExtInst %void %1 DebugLine %35 %uint_24 %uint_24 %uint_0 %uint_0 %391 = OpExtInst %void %1 DebugDeclare %388 %specular %102 %396 = OpLoad %83 %t_specular %397 = OpLoad %73 %g_sampler %398 = OpSampledImage %280 %396 %397 %399 = OpLoad %v2float %inUV %400 = OpImageSampleImplicitLod %v4float %398 %399 %401 = OpCompositeExtract %float %400 0 OpStore %specular %401 %406 = OpExtInst %void %1 DebugLine %35 %uint_25 %uint_25 %uint_0 %uint_0 %405 = OpExtInst %void %1 DebugDeclare %403 %metallic_0 %102 %410 = OpLoad %83 %t_metallic %411 = OpLoad %73 %g_sampler %412 = OpSampledImage %280 %410 %411 %413 = OpLoad %v2float %inUV %414 = OpImageSampleImplicitLod %v4float %412 %413 %415 = OpCompositeExtract %float %414 0 OpStore %metallic_0 %415 %419 = OpExtInst %void %1 DebugLine %35 %uint_26 %uint_26 %uint_0 %uint_0 %418 = OpExtInst %void %1 DebugDeclare %417 %roughness_3 %102 %423 = OpLoad %83 %t_roughness %424 = OpLoad %73 %g_sampler %425 = OpSampledImage %280 %423 %424 %426 = OpLoad %v2float %inUV %427 = OpImageSampleImplicitLod %v4float %425 %426 %428 = OpCompositeExtract %float %427 0 OpStore %roughness_3 %428 %435 = OpExtInst %void %1 DebugLine %35 %uint_27 %uint_27 %uint_0 %uint_0 %434 = OpLoad %83 %t_ao %436 = OpLoad %73 %g_sampler %437 = OpSampledImage %280 %434 %436 %438 = OpLoad %v2float %inUV %439 = OpImageSampleImplicitLod %v4float %437 %438 %440 = OpCompositeExtract %float %439 0 %441 = OpAccessChain %_ptr_Function_float %mat_out %int_6 OpStore %441 %440 %444 = OpExtInst %void %1 DebugLine %35 %uint_29 %uint_29 %uint_0 %uint_0 %443 = OpLoad %float %roughness_3 %448 = OpAccessChain %_ptr_PushConstant_float %ubo %int_2 %449 = OpLoad %float %448 %450 = OpFMul %float %443 %449 %451 = OpAccessChain %_ptr_Function_float %mat_out %int_3 OpStore %451 %450 %454 = OpExtInst %void %1 DebugLine %35 %uint_30 %uint_30 %uint_0 %uint_0 %453 = OpLoad %float %specular %456 = OpAccessChain %_ptr_PushConstant_float %ubo %int_3 %457 = OpLoad %float %456 %458 = OpFMul %float %453 %457 %459 = OpAccessChain %_ptr_Function_float %mat_out %int_4 OpStore %459 %458 %462 = OpExtInst %void %1 DebugLine %35 %uint_31 %uint_31 %uint_0 %uint_0 %461 = OpLoad %float %metallic_0 %464 = OpAccessChain %_ptr_PushConstant_float %ubo %int_1 %465 = OpLoad %float %464 %466 = OpFMul %float %461 %465 %467 = OpAccessChain %_ptr_Function_float %mat_out %int_5 OpStore %467 %466 %472 = OpExtInst %void %1 DebugLine %35 %uint_32 %uint_32 %uint_0 %uint_0 %471 = OpLoad %83 %t_emissive %473 = OpLoad %73 %g_sampler %474 = OpSampledImage %280 %471 %473 %475 = OpLoad %v2float %inUV %476 = OpImageSampleImplicitLod %v4float %474 %475 %477 = OpVectorShuffle %v3float %476 %476 0 1 2 %478 = OpAccessChain %_ptr_Function_v3float %mat_out %int_2 OpStore %478 %477 %480 = OpExtInst %void %1 DebugLine %35 %uint_34 %uint_34 %uint_0 %uint_0 %479 = OpLoad %LitOutput %mat_out OpReturnValue %479 OpFunctionEnd ; Function pcfForShadow_vf3_mf44_p1_t21_ %pcfForShadow_vf3_mf44_p1_t21_ = OpFunction %float None %89 %pixelWorldPos = OpFunctionParameter %_ptr_Function_v3float %lightViewProj = OpFunctionParameter %_ptr_Function_mat4v4float %shadowSampler = OpFunctionParameter %_ptr_UniformConstant_73 %t_depthshadow = OpFunctionParameter %_ptr_UniformConstant_83 %96 = OpLabel %sampledPos = OpVariable %_ptr_Function_v4float Function %103 = OpExtInst %void %1 DebugScope %98 %104 = OpExtInst %void %1 DebugLine %76 %uint_16 %uint_16 %uint_0 %uint_0 %101 = OpExtInst %void %1 DebugDeclare %99 %pixelWorldPos %102 %107 = OpExtInst %void %1 DebugDeclare %105 %lightViewProj %102 %110 = OpExtInst %void %1 DebugDeclare %108 %shadowSampler %102 %113 = OpExtInst %void %1 DebugDeclare %111 %t_depthshadow %102 %485 = OpExtInst %void %1 DebugFunctionDefinition %98 %pcfForShadow_vf3_mf44_p1_t21_ %490 = OpExtInst %void %1 DebugLine %76 %uint_17 %uint_17 %uint_0 %uint_0 %489 = OpExtInst %void %1 DebugDeclare %487 %sampledPos %102 %491 = OpLoad %v3float %pixelWorldPos %492 = OpCompositeExtract %float %491 0 %493 = OpCompositeExtract %float %491 1 %494 = OpCompositeExtract %float %491 2 %495 = OpCompositeConstruct %v4float %492 %493 %494 %float_1 OpStore %sampledPos %495 %497 = OpExtInst %void %1 DebugLine %76 %uint_18 %uint_18 %uint_0 %uint_0 %496 = OpLoad %mat4v4float %lightViewProj %498 = OpLoad %v4float %sampledPos %499 = OpMatrixTimesVector %v4float %496 %498 OpStore %sampledPos %499 %501 = OpExtInst %void %1 DebugLine %76 %uint_19 %uint_19 %uint_0 %uint_0 %500 = OpAccessChain %_ptr_Function_float %sampledPos %uint_3 %502 = OpLoad %float %500 %503 = OpLoad %v4float %sampledPos %504 = OpCompositeConstruct %v4float %502 %502 %502 %502 %505 = OpFDiv %v4float %503 %504 OpStore %sampledPos %505 %507 = OpExtInst %void %1 DebugLine %76 %uint_20 %uint_20 %uint_0 %uint_0 %506 = OpLoad %v4float %sampledPos %509 = OpVectorShuffle %v2float %506 %506 0 1 %511 = OpVectorTimesScalar %v2float %509 %float_0_5 %512 = OpCompositeConstruct %v2float %float_0_5 %float_0_5 %513 = OpFAdd %v2float %511 %512 %514 = OpAccessChain %_ptr_Function_float %sampledPos %uint_0 %515 = OpCompositeExtract %float %513 0 OpStore %514 %515 %516 = OpAccessChain %_ptr_Function_float %sampledPos %uint_1 %517 = OpCompositeExtract %float %513 1 OpStore %516 %517 %519 = OpExtInst %void %1 DebugLine %76 %uint_21 %uint_21 %uint_0 %uint_0 %518 = OpAccessChain %_ptr_Function_float %sampledPos %uint_1 %520 = OpLoad %float %518 %521 = OpFSub %float %float_1 %520 %522 = OpAccessChain %_ptr_Function_float %sampledPos %uint_1 OpStore %522 %521 %534 = OpExtInst %void %1 DebugLine %76 %uint_23 %uint_23 %uint_0 %uint_0 %533 = OpLoad %526 %t_depthshadowshadowSampler %535 = OpLoad %v4float %sampledPos %536 = OpVectorShuffle %v3float %535 %535 0 1 2 %537 = OpCompositeExtract %float %536 2 %538 = OpImageSampleDrefImplicitLod %float %533 %536 %537 Bias %float_0 OpReturnValue %538 OpFunctionEnd ; Function DistributionGGX_vf3_vf3_f1_ %DistributionGGX_vf3_vf3_f1_ = OpFunction %float None %116 %N = OpFunctionParameter %_ptr_Function_v3float %H = OpFunctionParameter %_ptr_Function_v3float %roughness = OpFunctionParameter %_ptr_Function_float %122 = OpLabel %a = OpVariable %_ptr_Function_float Function %a2 = OpVariable %_ptr_Function_float Function %NdotH = OpVariable %_ptr_Function_float Function %NdotH2 = OpVariable %_ptr_Function_float Function %num = OpVariable %_ptr_Function_float Function %denom = OpVariable %_ptr_Function_float Function %130 = OpExtInst %void %1 DebugScope %124 %131 = OpExtInst %void %1 DebugLine %125 %uint_2 %uint_2 %uint_0 %uint_0 %129 = OpExtInst %void %1 DebugDeclare %127 %N %102 %134 = OpExtInst %void %1 DebugDeclare %132 %H %102 %137 = OpExtInst %void %1 DebugDeclare %135 %roughness %102 %542 = OpExtInst %void %1 DebugFunctionDefinition %124 %DistributionGGX_vf3_vf3_f1_ %547 = OpExtInst %void %1 DebugLine %125 %uint_4 %uint_4 %uint_0 %uint_0 %546 = OpExtInst %void %1 DebugDeclare %544 %a %102 %548 = OpLoad %float %roughness %549 = OpLoad %float %roughness %550 = OpFMul %float %548 %549 OpStore %a %550 %555 = OpExtInst %void %1 DebugLine %125 %uint_5 %uint_5 %uint_0 %uint_0 %554 = OpExtInst %void %1 DebugDeclare %552 %a2 %102 %556 = OpLoad %float %a %557 = OpLoad %float %a %558 = OpFMul %float %556 %557 OpStore %a2 %558 %563 = OpExtInst %void %1 DebugLine %125 %uint_6 %uint_6 %uint_0 %uint_0 %562 = OpExtInst %void %1 DebugDeclare %560 %NdotH %102 %564 = OpLoad %v3float %N %565 = OpLoad %v3float %H %566 = OpDot %float %564 %565 %567 = OpExtInst %float %11 FMax %566 %float_0 OpStore %NdotH %567 %572 = OpExtInst %void %1 DebugLine %125 %uint_7 %uint_7 %uint_0 %uint_0 %571 = OpExtInst %void %1 DebugDeclare %569 %NdotH2 %102 %573 = OpLoad %float %NdotH %574 = OpLoad %float %NdotH %575 = OpFMul %float %573 %574 OpStore %NdotH2 %575 %580 = OpExtInst %void %1 DebugLine %125 %uint_9 %uint_9 %uint_0 %uint_0 %579 = OpExtInst %void %1 DebugDeclare %577 %num %102 %581 = OpLoad %float %a2 OpStore %num %581 %586 = OpExtInst %void %1 DebugLine %125 %uint_10 %uint_10 %uint_0 %uint_0 %585 = OpExtInst %void %1 DebugDeclare %583 %denom %102 %587 = OpLoad %float %NdotH2 %588 = OpLoad %float %a2 %589 = OpFSub %float %588 %float_1 %590 = OpFMul %float %587 %589 %591 = OpFAdd %float %590 %float_1 OpStore %denom %591 %594 = OpExtInst %void %1 DebugLine %125 %uint_11 %uint_11 %uint_0 %uint_0 %593 = OpLoad %float %denom %595 = OpFMul %float %float_3_1415925 %593 %596 = OpLoad %float %denom %597 = OpFMul %float %595 %596 OpStore %denom %597 %599 = OpExtInst %void %1 DebugLine %125 %uint_13 %uint_13 %uint_0 %uint_0 %598 = OpLoad %float %num %600 = OpLoad %float %denom %601 = OpFDiv %float %598 %600 OpReturnValue %601 OpFunctionEnd ; Function GeometrySchlickGGX_f1_f1_ %GeometrySchlickGGX_f1_f1_ = OpFunction %float None %138 %NdotV = OpFunctionParameter %_ptr_Function_float %roughness_0 = OpFunctionParameter %_ptr_Function_float %143 = OpLabel %r = OpVariable %_ptr_Function_float Function %k = OpVariable %_ptr_Function_float Function %num_0 = OpVariable %_ptr_Function_float Function %denom_0 = OpVariable %_ptr_Function_float Function %149 = OpExtInst %void %1 DebugScope %145 %150 = OpExtInst %void %1 DebugLine %125 %uint_16 %uint_16 %uint_0 %uint_0 %148 = OpExtInst %void %1 DebugDeclare %146 %NdotV %102 %152 = OpExtInst %void %1 DebugDeclare %151 %roughness_0 %102 %605 = OpExtInst %void %1 DebugFunctionDefinition %145 %GeometrySchlickGGX_f1_f1_ %610 = OpExtInst %void %1 DebugLine %125 %uint_18 %uint_18 %uint_0 %uint_0 %609 = OpExtInst %void %1 DebugDeclare %607 %r %102 %611 = OpLoad %float %roughness_0 %612 = OpFAdd %float %611 %float_1 OpStore %r %612 %617 = OpExtInst %void %1 DebugLine %125 %uint_19 %uint_19 %uint_0 %uint_0 %616 = OpExtInst %void %1 DebugDeclare %614 %k %102 %618 = OpLoad %float %r %619 = OpLoad %float %r %620 = OpFMul %float %618 %619 %622 = OpFDiv %float %620 %float_8 OpStore %k %622 %626 = OpExtInst %void %1 DebugLine %125 %uint_21 %uint_21 %uint_0 %uint_0 %625 = OpExtInst %void %1 DebugDeclare %624 %num_0 %102 %627 = OpLoad %float %NdotV OpStore %num_0 %627 %631 = OpExtInst %void %1 DebugLine %125 %uint_22 %uint_22 %uint_0 %uint_0 %630 = OpExtInst %void %1 DebugDeclare %629 %denom_0 %102 %632 = OpLoad %float %NdotV %633 = OpLoad %float %k %634 = OpFSub %float %float_1 %633 %635 = OpFMul %float %632 %634 %636 = OpLoad %float %k %637 = OpFAdd %float %635 %636 OpStore %denom_0 %637 %639 = OpExtInst %void %1 DebugLine %125 %uint_24 %uint_24 %uint_0 %uint_0 %638 = OpLoad %float %num_0 %640 = OpLoad %float %denom_0 %641 = OpFDiv %float %638 %640 OpReturnValue %641 OpFunctionEnd ; Function GeometrySmith_vf3_vf3_vf3_f1_ %GeometrySmith_vf3_vf3_vf3_f1_ = OpFunction %float None %153 %N_0 = OpFunctionParameter %_ptr_Function_v3float %V = OpFunctionParameter %_ptr_Function_v3float %L = OpFunctionParameter %_ptr_Function_v3float %roughness_1 = OpFunctionParameter %_ptr_Function_float %160 = OpLabel %NdotV_0 = OpVariable %_ptr_Function_float Function %NdotL = OpVariable %_ptr_Function_float Function %ggx2 = OpVariable %_ptr_Function_float Function %param = OpVariable %_ptr_Function_float Function %param_0 = OpVariable %_ptr_Function_float Function %ggx1 = OpVariable %_ptr_Function_float Function %param_1 = OpVariable %_ptr_Function_float Function %param_2 = OpVariable %_ptr_Function_float Function %166 = OpExtInst %void %1 DebugScope %162 %167 = OpExtInst %void %1 DebugLine %125 %uint_26 %uint_26 %uint_0 %uint_0 %165 = OpExtInst %void %1 DebugDeclare %164 %N_0 %102 %170 = OpExtInst %void %1 DebugDeclare %168 %V %102 %173 = OpExtInst %void %1 DebugDeclare %171 %L %102 %175 = OpExtInst %void %1 DebugDeclare %174 %roughness_1 %102 %645 = OpExtInst %void %1 DebugFunctionDefinition %162 %GeometrySmith_vf3_vf3_vf3_f1_ %650 = OpExtInst %void %1 DebugLine %125 %uint_28 %uint_28 %uint_0 %uint_0 %649 = OpExtInst %void %1 DebugDeclare %647 %NdotV_0 %102 %651 = OpLoad %v3float %N_0 %652 = OpLoad %v3float %V %653 = OpDot %float %651 %652 %654 = OpExtInst %float %11 FMax %653 %float_0 OpStore %NdotV_0 %654 %659 = OpExtInst %void %1 DebugLine %125 %uint_29 %uint_29 %uint_0 %uint_0 %658 = OpExtInst %void %1 DebugDeclare %656 %NdotL %102 %660 = OpLoad %v3float %N_0 %661 = OpLoad %v3float %L %662 = OpDot %float %660 %661 %663 = OpExtInst %float %11 FMax %662 %float_0 OpStore %NdotL %663 %668 = OpExtInst %void %1 DebugLine %125 %uint_30 %uint_30 %uint_0 %uint_0 %667 = OpExtInst %void %1 DebugDeclare %665 %ggx2 %102 %670 = OpLoad %float %NdotV_0 OpStore %param %670 %672 = OpLoad %float %roughness_1 OpStore %param_0 %672 %673 = OpFunctionCall %float %GeometrySchlickGGX_f1_f1_ %param %param_0 OpStore %ggx2 %673 %678 = OpExtInst %void %1 DebugLine %125 %uint_31 %uint_31 %uint_0 %uint_0 %677 = OpExtInst %void %1 DebugDeclare %675 %ggx1 %102 %680 = OpLoad %float %NdotL OpStore %param_1 %680 %682 = OpLoad %float %roughness_1 OpStore %param_2 %682 %683 = OpFunctionCall %float %GeometrySchlickGGX_f1_f1_ %param_1 %param_2 OpStore %ggx1 %683 %685 = OpExtInst %void %1 DebugLine %125 %uint_33 %uint_33 %uint_0 %uint_0 %684 = OpLoad %float %ggx1 %687 = OpLoad %float %ggx2 %688 = OpFMul %float %684 %687 OpReturnValue %688 OpFunctionEnd ; Function fresnelSchlick_f1_vf3_ %fresnelSchlick_f1_vf3_ = OpFunction %v3float None %176 %cosTheta = OpFunctionParameter %_ptr_Function_float %F0 = OpFunctionParameter %_ptr_Function_v3float %181 = OpLabel %188 = OpExtInst %void %1 DebugScope %183 %189 = OpExtInst %void %1 DebugLine %125 %uint_36 %uint_36 %uint_0 %uint_0 %187 = OpExtInst %void %1 DebugDeclare %185 %cosTheta %102 %192 = OpExtInst %void %1 DebugDeclare %190 %F0 %102 %692 = OpExtInst %void %1 DebugFunctionDefinition %183 %fresnelSchlick_f1_vf3_ %694 = OpExtInst %void %1 DebugLine %125 %uint_38 %uint_38 %uint_0 %uint_0 %693 = OpLoad %v3float %F0 %696 = OpLoad %v3float %F0 %697 = OpCompositeConstruct %v3float %float_1 %float_1 %float_1 %698 = OpFSub %v3float %697 %696 %699 = OpLoad %float %cosTheta %700 = OpFSub %float %float_1 %699 %701 = OpExtInst %float %11 FClamp %700 %float_0 %float_1 %703 = OpExtInst %float %11 Pow %701 %float_5 %704 = OpVectorTimesScalar %v3float %698 %703 %705 = OpFAdd %v3float %693 %704 OpReturnValue %705 OpFunctionEnd ; Function CalculateLightRadiance_vf3_vf3_vf3_vf3_f1_f1_vf3_f1_vf3_ %CalculateLightRadiance_vf3_vf3_vf3_vf3_f1_f1_vf3_f1_vf3_ = OpFunction %v3float None %193 %Normal = OpFunctionParameter %_ptr_Function_v3float %camPos = OpFunctionParameter %_ptr_Function_v3float %WorldPos = OpFunctionParameter %_ptr_Function_v3float %albedo = OpFunctionParameter %_ptr_Function_v3float %metallic = OpFunctionParameter %_ptr_Function_float %roughness_2 = OpFunctionParameter %_ptr_Function_float %L_0 = OpFunctionParameter %_ptr_Function_v3float %attenuation = OpFunctionParameter %_ptr_Function_float %lightColor = OpFunctionParameter %_ptr_Function_v3float %205 = OpLabel %N_1 = OpVariable %_ptr_Function_v3float Function %V_0 = OpVariable %_ptr_Function_v3float Function %F0_0 = OpVariable %_ptr_Function_v3float Function %H_0 = OpVariable %_ptr_Function_v3float Function %radiance = OpVariable %_ptr_Function_v3float Function %NDF = OpVariable %_ptr_Function_float Function %param_3 = OpVariable %_ptr_Function_v3float Function %param_4 = OpVariable %_ptr_Function_v3float Function %param_5 = OpVariable %_ptr_Function_float Function %G = OpVariable %_ptr_Function_float Function %param_6 = OpVariable %_ptr_Function_v3float Function %param_7 = OpVariable %_ptr_Function_v3float Function %param_8 = OpVariable %_ptr_Function_v3float Function %param_9 = OpVariable %_ptr_Function_float Function %F = OpVariable %_ptr_Function_v3float Function %param_10 = OpVariable %_ptr_Function_float Function %param_11 = OpVariable %_ptr_Function_v3float Function %kS = OpVariable %_ptr_Function_v3float Function %kD = OpVariable %_ptr_Function_v3float Function %numerator = OpVariable %_ptr_Function_v3float Function %denominator = OpVariable %_ptr_Function_float Function %specular_0 = OpVariable %_ptr_Function_v3float Function %NdotL_0 = OpVariable %_ptr_Function_float Function %Lo = OpVariable %_ptr_Function_v3float Function %212 = OpExtInst %void %1 DebugScope %207 %213 = OpExtInst %void %1 DebugLine %125 %uint_52 %uint_52 %uint_0 %uint_0 %211 = OpExtInst %void %1 DebugDeclare %209 %Normal %102 %216 = OpExtInst %void %1 DebugDeclare %214 %camPos %102 %219 = OpExtInst %void %1 DebugDeclare %217 %WorldPos %102 %222 = OpExtInst %void %1 DebugDeclare %220 %albedo %102 %226 = OpExtInst %void %1 DebugDeclare %223 %metallic %102 %228 = OpExtInst %void %1 DebugDeclare %227 %roughness_2 %102 %230 = OpExtInst %void %1 DebugDeclare %229 %L_0 %102 %233 = OpExtInst %void %1 DebugDeclare %231 %attenuation %102 %237 = OpExtInst %void %1 DebugDeclare %234 %lightColor %102 %709 = OpExtInst %void %1 DebugFunctionDefinition %207 %CalculateLightRadiance_vf3_vf3_vf3_vf3_f1_f1_vf3_f1_vf3_ %714 = OpExtInst %void %1 DebugLine %125 %uint_53 %uint_53 %uint_0 %uint_0 %713 = OpExtInst %void %1 DebugDeclare %711 %N_1 %102 %715 = OpLoad %v3float %Normal %716 = OpExtInst %v3float %11 Normalize %715 OpStore %N_1 %716 %721 = OpExtInst %void %1 DebugLine %125 %uint_54 %uint_54 %uint_0 %uint_0 %720 = OpExtInst %void %1 DebugDeclare %718 %V_0 %102 %722 = OpLoad %v3float %camPos %723 = OpLoad %v3float %WorldPos %724 = OpFSub %v3float %722 %723 %725 = OpExtInst %v3float %11 Normalize %724 OpStore %V_0 %725 %730 = OpExtInst %void %1 DebugLine %125 %uint_56 %uint_56 %uint_0 %uint_0 %729 = OpExtInst %void %1 DebugDeclare %727 %F0_0 %102 OpStore %F0_0 %732 %734 = OpExtInst %void %1 DebugLine %125 %uint_57 %uint_57 %uint_0 %uint_0 %733 = OpLoad %v3float %F0_0 %736 = OpLoad %v3float %albedo %737 = OpLoad %float %metallic %738 = OpCompositeConstruct %v3float %737 %737 %737 %739 = OpExtInst %v3float %11 FMix %733 %736 %738 OpStore %F0_0 %739 %744 = OpExtInst %void %1 DebugLine %125 %uint_60 %uint_60 %uint_0 %uint_0 %743 = OpExtInst %void %1 DebugDeclare %741 %H_0 %102 %745 = OpLoad %v3float %V_0 %746 = OpLoad %v3float %L_0 %747 = OpFAdd %v3float %745 %746 %748 = OpExtInst %v3float %11 Normalize %747 OpStore %H_0 %748 %754 = OpExtInst %void %1 DebugLine %125 %uint_61 %uint_61 %uint_0 %uint_0 %753 = OpExtInst %void %1 DebugDeclare %750 %radiance %102 %755 = OpLoad %v3float %lightColor %756 = OpLoad %float %attenuation %757 = OpVectorTimesScalar %v3float %755 %756 OpStore %radiance %757 %763 = OpExtInst %void %1 DebugLine %125 %uint_64 %uint_64 %uint_0 %uint_0 %762 = OpExtInst %void %1 DebugDeclare %759 %NDF %102 %765 = OpLoad %v3float %N_1 OpStore %param_3 %765 %767 = OpLoad %v3float %H_0 OpStore %param_4 %767 %769 = OpLoad %float %roughness_2 OpStore %param_5 %769 %770 = OpFunctionCall %float %DistributionGGX_vf3_vf3_f1_ %param_3 %param_4 %param_5 OpStore %NDF %770 %776 = OpExtInst %void %1 DebugLine %125 %uint_65 %uint_65 %uint_0 %uint_0 %775 = OpExtInst %void %1 DebugDeclare %772 %G %102 %778 = OpLoad %v3float %N_1 OpStore %param_6 %778 %780 = OpLoad %v3float %V_0 OpStore %param_7 %780 %782 = OpLoad %v3float %L_0 OpStore %param_8 %782 %784 = OpLoad %float %roughness_2 OpStore %param_9 %784 %785 = OpFunctionCall %float %GeometrySmith_vf3_vf3_vf3_f1_ %param_6 %param_7 %param_8 %param_9 OpStore %G %785 %791 = OpExtInst %void %1 DebugLine %125 %uint_66 %uint_66 %uint_0 %uint_0 %790 = OpExtInst %void %1 DebugDeclare %787 %F %102 %792 = OpLoad %v3float %H_0 %793 = OpLoad %v3float %V_0 %794 = OpDot %float %792 %793 %795 = OpExtInst %float %11 FMax %794 %float_0 OpStore %param_10 %795 %798 = OpLoad %v3float %F0_0 OpStore %param_11 %798 %799 = OpFunctionCall %v3float %fresnelSchlick_f1_vf3_ %param_10 %param_11 OpStore %F %799 %805 = OpExtInst %void %1 DebugLine %125 %uint_68 %uint_68 %uint_0 %uint_0 %804 = OpExtInst %void %1 DebugDeclare %801 %kS %102 %806 = OpLoad %v3float %F OpStore %kS %806 %812 = OpExtInst %void %1 DebugLine %125 %uint_69 %uint_69 %uint_0 %uint_0 %811 = OpExtInst %void %1 DebugDeclare %808 %kD %102 %814 = OpLoad %v3float %kS %815 = OpFSub %v3float %813 %814 OpStore %kD %815 %817 = OpExtInst %void %1 DebugLine %125 %uint_70 %uint_70 %uint_0 %uint_0 %816 = OpLoad %float %metallic %819 = OpFSub %float %float_1 %816 %820 = OpLoad %v3float %kD %821 = OpVectorTimesScalar %v3float %820 %819 OpStore %kD %821 %826 = OpExtInst %void %1 DebugLine %125 %uint_72 %uint_72 %uint_0 %uint_0 %825 = OpExtInst %void %1 DebugDeclare %823 %numerator %102 %827 = OpLoad %float %NDF %828 = OpLoad %float %G %829 = OpFMul %float %827 %828 %830 = OpLoad %v3float %F %831 = OpVectorTimesScalar %v3float %830 %829 OpStore %numerator %831 %837 = OpExtInst %void %1 DebugLine %125 %uint_73 %uint_73 %uint_0 %uint_0 %836 = OpExtInst %void %1 DebugDeclare %833 %denominator %102 %839 = OpLoad %v3float %N_1 %840 = OpLoad %v3float %V_0 %841 = OpDot %float %839 %840 %842 = OpExtInst %float %11 FMax %841 %float_0 %843 = OpFMul %float %float_4 %842 %844 = OpLoad %v3float %N_1 %845 = OpLoad %v3float %L_0 %846 = OpDot %float %844 %845 %847 = OpExtInst %float %11 FMax %846 %float_0 %848 = OpFMul %float %843 %847 %850 = OpFAdd %float %848 %float_9_99999975en05 OpStore %denominator %850 %855 = OpExtInst %void %1 DebugLine %125 %uint_74 %uint_74 %uint_0 %uint_0 %854 = OpExtInst %void %1 DebugDeclare %852 %specular_0 %102 %856 = OpLoad %v3float %numerator %857 = OpLoad %float %denominator %858 = OpCompositeConstruct %v3float %857 %857 %857 %859 = OpFDiv %v3float %856 %858 OpStore %specular_0 %859 %864 = OpExtInst %void %1 DebugLine %125 %uint_77 %uint_77 %uint_0 %uint_0 %863 = OpExtInst %void %1 DebugDeclare %861 %NdotL_0 %102 %865 = OpLoad %v3float %N_1 %866 = OpLoad %v3float %L_0 %867 = OpDot %float %865 %866 %868 = OpExtInst %float %11 FMax %867 %float_0 OpStore %NdotL_0 %868 %874 = OpExtInst %void %1 DebugLine %125 %uint_78 %uint_78 %uint_0 %uint_0 %873 = OpExtInst %void %1 DebugDeclare %870 %Lo %102 %875 = OpLoad %v3float %kD %876 = OpLoad %v3float %albedo %877 = OpFMul %v3float %875 %876 %878 = OpCompositeConstruct %v3float %float_3_1415925 %float_3_1415925 %float_3_1415925 %879 = OpFDiv %v3float %877 %878 %880 = OpLoad %v3float %specular_0 %881 = OpFAdd %v3float %879 %880 %882 = OpLoad %v3float %radiance %883 = OpFMul %v3float %881 %882 %884 = OpLoad %float %NdotL_0 %885 = OpVectorTimesScalar %v3float %883 %884 OpStore %Lo %885 %887 = OpExtInst %void %1 DebugLine %125 %uint_80 %uint_80 %uint_0 %uint_0 %886 = OpLoad %v3float %Lo OpReturnValue %886 OpFunctionEnd ; Function getLightAttenuation_f1_ %getLightAttenuation_f1_ = OpFunction %float None %238 %dist = OpFunctionParameter %_ptr_Function_float %242 = OpLabel %251 = OpExtInst %void %1 DebugScope %244 %252 = OpExtInst %void %1 DebugLine %245 %uint_40 %uint_40 %uint_0 %uint_0 %250 = OpExtInst %void %1 DebugDeclare %248 %dist %102 %892 = OpExtInst %void %1 DebugFunctionDefinition %244 %getLightAttenuation_f1_ %894 = OpExtInst %void %1 DebugLine %245 %uint_41 %uint_41 %uint_0 %uint_0 %893 = OpLoad %float %dist %896 = OpLoad %float %dist %897 = OpFMul %float %893 %896 %898 = OpFDiv %float %float_1 %897 OpReturnValue %898 OpFunctionEnd