1spv.debuginfo.glsl.frag 2// Module Version 10000 3// Generated by (magic number): 8000b 4// Id's are bound by 886 5 6 Capability Shader 7 Capability ImageQuery 8 Extension "SPV_KHR_non_semantic_info" 9 1: ExtInstImport "NonSemantic.Shader.DebugInfo.100" 10 3: ExtInstImport "GLSL.std.450" 11 MemoryModel Logical GLSL450 12 EntryPoint Fragment 14 "main" 503 557 13 ExecutionMode 14 OriginUpperLeft 14 2: String "spv.debuginfo.glsl.frag" 15 8: String "uint" 16 17: String "float" 17 39: String "textureProj" 18 42: String "// OpModuleProcessed auto-map-locations 19// OpModuleProcessed auto-map-bindings 20// OpModuleProcessed client vulkan100 21// OpModuleProcessed target-env vulkan1.0 22// OpModuleProcessed keep-uncalled 23// OpModuleProcessed entry-point main 24#line 1 25/* 26The MIT License (MIT) 27 28Copyright (c) 2022 Sascha Willems 29 30Permission is hereby granted, free of charge, to any person obtaining a copy 31of this software and associated documentation files (the "Software"), to deal 32in the Software without restriction, including without limitation the rights 33to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 34copies of the Software, and to permit persons to whom the Software is 35furnished to do so, subject to the following conditions: 36 37The above copyright notice and this permission notice shall be included in all 38copies or substantial portions of the Software. 39 40THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 41IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 42FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 43AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 44LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 45OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 46SOFTWARE. 47*/ 48 49#version 450 50 51layout (binding = 1) uniform sampler2D samplerposition; 52layout (binding = 2) uniform sampler2D samplerNormal; 53layout (binding = 3) uniform sampler2D samplerAlbedo; 54layout (binding = 5) uniform sampler2DArray samplerShadowMap; 55 56layout (location = 0) in vec2 inUV; 57 58layout (location = 0) out vec4 outFragColor; 59 60#define LIGHT_COUNT 3 61#define SHADOW_FACTOR 0.25 62#define AMBIENT_LIGHT 0.1 63#define USE_PCF 64 65int global_var = 0; 66 67struct Light 68{ 69 vec4 position; 70 vec4 target; 71 vec4 color; 72 mat4 viewMatrix; 73}; 74 75layout (binding = 4) uniform UBO 76{ 77 vec4 viewPos; 78 Light lights[LIGHT_COUNT]; 79 int useShadows; 80 int debugDisplayTarget; 81} ubo; 82 83float textureProj(vec4 P, float layer, vec2 offset) 84{ 85 float shadow = 1.0; 86 vec4 shadowCoord = P / P.w; 87 shadowCoord.st = shadowCoord.st * 0.5 + 0.5; 88 89 if (shadowCoord.z > -1.0 && shadowCoord.z < 1.0) 90 { 91 float dist = texture(samplerShadowMap, vec3(shadowCoord.st + offset, layer)).r; 92 if (shadowCoord.w > 0.0 && dist < shadowCoord.z) 93 { 94 shadow = SHADOW_FACTOR; 95 } 96 } 97 return shadow; 98} 99 100float filterPCF(vec4 sc, float layer) 101{ 102 ivec2 texDim = textureSize(samplerShadowMap, 0).xy; 103 float scale = 1.5; 104 float dx = scale * 1.0 / float(texDim.x); 105 float dy = scale * 1.0 / float(texDim.y); 106 107 float shadowFactor = 0.0; 108 int count = 0; 109 int range = 1; 110 111 for (int x = -range; x <= range; x++) 112 { 113 for (int y = -range; y <= range; y++) 114 { 115 shadowFactor += textureProj(sc, layer, vec2(dx*x, dy*y)); 116 count++; 117 } 118 119 } 120 return shadowFactor / count; 121} 122 123vec3 shadow(vec3 fragcolor, vec3 fragpos) { 124 for(int i = 0; i < LIGHT_COUNT; ++i) 125 { 126 vec4 shadowClip = ubo.lights[i].viewMatrix * vec4(fragpos, 1.0); 127 128 float shadowFactor; 129 #ifdef USE_PCF 130 shadowFactor= filterPCF(shadowClip, i); 131 #else 132 shadowFactor = textureProj(shadowClip, i, vec2(0.0)); 133 #endif 134 135 fragcolor *= shadowFactor; 136 } 137 return fragcolor; 138} 139 140void main() 141{ 142 // Get G-Buffer values 143 vec3 fragPos = texture(samplerposition, inUV).rgb; 144 vec3 normal = texture(samplerNormal, inUV).rgb; 145 vec4 albedo = texture(samplerAlbedo, inUV); 146 147 // Debug display 148 if (ubo.debugDisplayTarget > 0) { 149 switch (ubo.debugDisplayTarget) { 150 case 1: 151 outFragColor.rgb = shadow(vec3(1.0), fragPos).rgb; 152 break; 153 case 2: 154 outFragColor.rgb = fragPos; 155 break; 156 case 3: 157 outFragColor.rgb = normal; 158 break; 159 case 4: 160 outFragColor.rgb = albedo.rgb; 161 break; 162 case 5: 163 outFragColor.rgb = albedo.aaa; 164 break; 165 } 166 outFragColor.a = 1.0; 167 return; 168 } 169 170 // Ambient part 171 vec3 fragcolor = albedo.rgb * AMBIENT_LIGHT; 172 173 vec3 N = normalize(normal); 174 175 for(int i = 0; i < LIGHT_COUNT; ++i) 176 { 177 // Vector to light 178 vec3 L = ubo.lights[i].position.xyz - fragPos; 179 // Distance from light to fragment position 180 float dist = length(L); 181 L = normalize(L); 182 183 // Viewer to fragment 184 vec3 V = ubo.viewPos.xyz - fragPos; 185 V = normalize(V); 186 187 float lightCosInnerAngle = cos(radians(15.0)); 188 float lightCosOuterAngle = cos(radians(25.0)); 189 float lightRange = 100.0; 190 191 // Direction vector from source to target 192 vec3 dir = normalize(ubo.lights[i].position.xyz - ubo.lights[i].target.xyz); 193 194 // Dual cone spot light with smooth transition between inner and outer angle 195 float cosDir = dot(L, dir); 196 float spotEffect = smoothstep(lightCosOuterAngle, lightCosInnerAngle, cosDir); 197 float heightAttenuation = smoothstep(lightRange, 0.0f, dist); 198 199 // Diffuse lighting 200 float NdotL = max(0.0, dot(N, L)); 201 vec3 diff = vec3(NdotL); 202 203 // Specular lighting 204 vec3 R = reflect(-L, N); 205 float NdotR = max(0.0, dot(R, V)); 206 vec3 spec = vec3(pow(NdotR, 16.0) * albedo.a * 2.5); 207 208 fragcolor += vec3((diff + spec) * spotEffect * heightAttenuation) * ubo.lights[i].color.rgb * albedo.rgb; 209 } 210 211 // Shadow calculations in a separate pass 212 if (ubo.useShadows > 0) 213 { 214 fragcolor = shadow(fragcolor, fragPos); 215 } 216 217 outFragColor = vec4(fragcolor, 1.0); 218} 219" 220 47: String "P" 221 53: String "layer" 222 56: String "offset" 223 64: String "filterPCF" 224 68: String "sc" 225 84: String "shadow" 226 88: String "fragcolor" 227 93: String "fragpos" 228 95: String "main" 229 99: String "int" 230 105: String "global_var" 231 120: String "shadowCoord" 232 142: String "bool" 233 167: String "dist" 234 173: String "type.2d.image" 235 174: String "@type.2d.image" 236 178: String "type.sampled.image" 237 179: String "@type.sampled.image" 238 184: String "samplerShadowMap" 239 237: String "texDim" 240 249: String "scale" 241 256: String "dx" 242 270: String "dy" 243 282: String "shadowFactor" 244 288: String "count" 245 294: String "range" 246 301: String "x" 247 321: String "y" 248 387: String "i" 249 405: String "shadowClip" 250 415: String "color" 251 420: String "viewMatrix" 252 423: String "Light" 253 429: String "lights" 254 432: String "debugDisplayTarget" 255 436: String "UBO" 256 441: String "ubo" 257 487: String "fragPos" 258 499: String "samplerposition" 259 505: String "inUV" 260 511: String "normal" 261 517: String "samplerNormal" 262 524: String "albedo" 263 530: String "samplerAlbedo" 264 559: String "outFragColor" 265 653: String "N" 266 677: String "L" 267 703: String "V" 268 718: String "lightCosInnerAngle" 269 725: String "lightCosOuterAngle" 270 732: String "lightRange" 271 739: String "dir" 272 755: String "cosDir" 273 764: String "spotEffect" 274 774: String "heightAttenuation" 275 783: String "NdotL" 276 793: String "diff" 277 801: String "R" 278 811: String "NdotR" 279 821: String "spec" 280 Name 14 "main" 281 Name 37 "textureProj(vf4;f1;vf2;" 282 Name 34 "P" 283 Name 35 "layer" 284 Name 36 "offset" 285 Name 62 "filterPCF(vf4;f1;" 286 Name 60 "sc" 287 Name 61 "layer" 288 Name 82 "shadow(vf3;vf3;" 289 Name 80 "fragcolor" 290 Name 81 "fragpos" 291 Name 103 "global_var" 292 Name 112 "shadow" 293 Name 118 "shadowCoord" 294 Name 165 "dist" 295 Name 182 "samplerShadowMap" 296 Name 235 "texDim" 297 Name 247 "scale" 298 Name 254 "dx" 299 Name 268 "dy" 300 Name 280 "shadowFactor" 301 Name 286 "count" 302 Name 292 "range" 303 Name 299 "x" 304 Name 319 "y" 305 Name 352 "param" 306 Name 354 "param" 307 Name 356 "param" 308 Name 385 "i" 309 Name 403 "shadowClip" 310 Name 413 "Light" 311 MemberName 413(Light) 0 "position" 312 MemberName 413(Light) 1 "target" 313 MemberName 413(Light) 2 "color" 314 MemberName 413(Light) 3 "viewMatrix" 315 Name 426 "UBO" 316 MemberName 426(UBO) 0 "viewPos" 317 MemberName 426(UBO) 1 "lights" 318 MemberName 426(UBO) 2 "useShadows" 319 MemberName 426(UBO) 3 "debugDisplayTarget" 320 Name 439 "ubo" 321 Name 453 "shadowFactor" 322 Name 460 "param" 323 Name 462 "param" 324 Name 485 "fragPos" 325 Name 497 "samplerposition" 326 Name 503 "inUV" 327 Name 509 "normal" 328 Name 515 "samplerNormal" 329 Name 522 "albedo" 330 Name 528 "samplerAlbedo" 331 Name 557 "outFragColor" 332 Name 562 "param" 333 Name 565 "param" 334 Name 641 "fragcolor" 335 Name 651 "N" 336 Name 659 "i" 337 Name 675 "L" 338 Name 690 "dist" 339 Name 701 "V" 340 Name 716 "lightCosInnerAngle" 341 Name 723 "lightCosOuterAngle" 342 Name 730 "lightRange" 343 Name 737 "dir" 344 Name 753 "cosDir" 345 Name 762 "spotEffect" 346 Name 772 "heightAttenuation" 347 Name 781 "NdotL" 348 Name 791 "diff" 349 Name 799 "R" 350 Name 809 "NdotR" 351 Name 819 "spec" 352 Name 869 "param" 353 Name 873 "param" 354 Decorate 182(samplerShadowMap) Binding 5 355 Decorate 182(samplerShadowMap) DescriptorSet 0 356 MemberDecorate 413(Light) 0 Offset 0 357 MemberDecorate 413(Light) 1 Offset 16 358 MemberDecorate 413(Light) 2 Offset 32 359 MemberDecorate 413(Light) 3 ColMajor 360 MemberDecorate 413(Light) 3 MatrixStride 16 361 MemberDecorate 413(Light) 3 Offset 48 362 Decorate 424 ArrayStride 112 363 Decorate 426(UBO) Block 364 MemberDecorate 426(UBO) 0 Offset 0 365 MemberDecorate 426(UBO) 1 Offset 16 366 MemberDecorate 426(UBO) 2 Offset 352 367 MemberDecorate 426(UBO) 3 Offset 356 368 Decorate 439(ubo) Binding 4 369 Decorate 439(ubo) DescriptorSet 0 370 Decorate 497(samplerposition) Binding 1 371 Decorate 497(samplerposition) DescriptorSet 0 372 Decorate 503(inUV) Location 0 373 Decorate 515(samplerNormal) Binding 2 374 Decorate 515(samplerNormal) DescriptorSet 0 375 Decorate 528(samplerAlbedo) Binding 3 376 Decorate 528(samplerAlbedo) DescriptorSet 0 377 Decorate 557(outFragColor) Location 0 378 4: TypeVoid 379 5: TypeFunction 4 380 7: TypeInt 32 0 381 10: 7(int) Constant 32 382 11: 7(int) Constant 6 383 12: 7(int) Constant 0 384 9: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 385 13: 7(int) Constant 3 386 6: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 387 16: TypeFloat 32 388 18: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 17 10 13 12 389 19: TypeVector 16(float) 4 390 20: 7(int) Constant 4 391 21: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 20 392 22: TypePointer Function 19(fvec4) 393 23: 7(int) Constant 7 394 24: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 21 23 12 395 25: TypePointer Function 16(float) 396 26: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 18 23 12 397 27: TypeVector 16(float) 2 398 28: 7(int) Constant 2 399 29: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 28 400 30: TypePointer Function 27(fvec2) 401 31: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 29 23 12 402 32: TypeFunction 16(float) 22(ptr) 25(ptr) 30(ptr) 403 33: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 18 21 18 29 404 41: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 2 42 405 43: 7(int) Constant 59 406 45: 7(int) Constant 1 407 44: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 45 20 41 28 408 40: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 39 33 41 43 12 44 39 13 43 409 46: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 21 41 43 12 40 20 45 410 49: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) 411 52: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 53 18 41 43 12 40 20 28 412 55: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 56 29 41 43 12 40 20 13 413 58: TypeFunction 16(float) 22(ptr) 25(ptr) 414 59: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 18 21 18 415 66: 7(int) Constant 76 416 65: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 64 59 41 66 12 44 64 13 66 417 67: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 68 21 41 66 12 65 20 45 418 72: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 53 18 41 66 12 65 20 28 419 74: TypeVector 16(float) 3 420 75: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 18 13 421 76: TypePointer Function 74(fvec3) 422 77: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 75 23 12 423 78: TypeFunction 74(fvec3) 76(ptr) 76(ptr) 424 79: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 75 75 75 425 86: 7(int) Constant 99 426 85: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 84 79 41 86 12 44 84 13 86 427 87: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 88 75 41 86 12 85 20 45 428 92: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 93 75 41 86 12 85 20 28 429 97: 7(int) Constant 116 430 96: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 95 6 41 97 12 44 95 13 97 431 98: TypeInt 32 1 432 100: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 99 10 20 12 433 101: TypePointer Private 98(int) 434 102: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 100 11 12 435 103(global_var): 101(ptr) Variable Private 436 106: 7(int) Constant 41 437 107: 7(int) Constant 8 438 104: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 105 100 41 106 12 44 105 103(global_var) 107 439 108: 98(int) Constant 0 440 114: 7(int) Constant 61 441 113: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 84 18 41 114 12 40 20 442 117: 16(float) Constant 1065353216 443 121: 7(int) Constant 62 444 119: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 120 21 41 121 12 40 20 445 131: 7(int) Constant 63 446 133: 16(float) Constant 1056964608 447 141: TypeBool 448 143: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 142 10 28 12 449 146: 7(int) Constant 65 450 148: 16(float) Constant 3212836864 451 163: 7(int) Constant 67 452 164: 7(int) Constant 14 453 162: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 41 163 164 40 454 166: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 167 18 41 163 12 162 20 455 171: TypeImage 16(float) 2D array sampled format:Unknown 456 175: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) 457 172: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 173 12 41 163 12 44 174 175 13 458 176: TypeSampledImage 171 459 177: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 178 12 41 163 12 44 179 175 13 460 180: TypePointer UniformConstant 176 461 181: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 177 12 12 462182(samplerShadowMap): 180(ptr) Variable UniformConstant 463 183: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 184 177 41 163 12 44 184 182(samplerShadowMap) 107 464 198: 7(int) Constant 68 465 200: 16(float) Constant 0 466 216: 7(int) Constant 70 467 217: 7(int) Constant 11 468 215: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 41 216 217 162 469 218: 16(float) Constant 1048576000 470 224: 7(int) Constant 73 471 229: 7(int) Constant 74 472 231: TypeVector 98(int) 2 473 232: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 100 28 474 233: TypePointer Function 231(ivec2) 475 234: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 232 23 12 476 238: 7(int) Constant 78 477 236: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 237 232 41 238 12 65 20 478 243: TypeVector 98(int) 3 479 244: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 100 13 480 250: 7(int) Constant 79 481 248: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 249 18 41 250 12 65 20 482 253: 16(float) Constant 1069547520 483 257: 7(int) Constant 80 484 255: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 256 18 41 257 12 65 20 485 262: TypePointer Function 98(int) 486 263: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 100 23 12 487 271: 7(int) Constant 81 488 269: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 270 18 41 271 12 65 20 489 283: 7(int) Constant 83 490 281: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 282 18 41 283 12 65 20 491 289: 7(int) Constant 84 492 287: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 288 100 41 289 12 65 20 493 295: 7(int) Constant 85 494 293: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 294 100 41 295 12 65 20 495 298: 98(int) Constant 1 496 302: 7(int) Constant 87 497 300: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 301 100 41 302 12 65 20 498 322: 7(int) Constant 89 499 320: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 321 100 41 322 12 65 20 500 343: 7(int) Constant 91 501 362: 7(int) Constant 92 502 375: 7(int) Constant 96 503 383: 7(int) Constant 97 504 388: 7(int) Constant 100 505 386: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 387 100 41 388 12 85 20 506 401: 98(int) Constant 3 507 406: 7(int) Constant 102 508 404: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 405 21 41 406 12 85 20 509 410: TypeMatrix 19(fvec4) 4 510 412: 141(bool) ConstantTrue 511 411: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 21 20 412 512 413(Light): TypeStruct 19(fvec4) 19(fvec4) 19(fvec4) 410 513 416: 7(int) Constant 47 514 414: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 415 21 41 416 23 12 12 13 515 417: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 415 21 41 416 23 12 12 13 516 418: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 415 21 41 416 23 12 12 13 517 421: 7(int) Constant 48 518 419: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 420 411 41 421 23 12 12 13 519 422: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 423 45 41 406 12 44 423 12 13 414 417 418 419 520 424: TypeArray 413(Light) 13 521 425: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 422 13 522 426(UBO): TypeStruct 19(fvec4) 424 98(int) 98(int) 523 427: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 415 21 41 416 23 12 12 13 524 430: 7(int) Constant 54 525 428: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 429 425 41 430 107 12 12 13 526 433: 7(int) Constant 56 527 431: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 432 100 41 433 11 12 12 13 528 434: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 432 100 41 433 11 12 12 13 529 435: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 436 45 41 406 12 44 436 12 13 427 428 431 434 530 437: TypePointer Uniform 426(UBO) 531 438: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 435 28 12 532 439(ubo): 437(ptr) Variable Uniform 533 440: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 441 435 41 406 12 44 441 439(ubo) 107 534 443: TypePointer Uniform 410 535 444: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 411 28 12 536 455: 7(int) Constant 106 537 454: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 282 18 41 455 12 85 20 538 466: 7(int) Constant 111 539 476: 7(int) Constant 113 540 481: 7(int) Constant 114 541 488: 7(int) Constant 119 542 486: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 487 75 41 488 12 96 20 543 491: TypeImage 16(float) 2D sampled format:Unknown 544 492: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 173 12 41 488 12 44 174 175 13 545 493: TypeSampledImage 491 546 494: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 178 12 41 488 12 44 179 175 13 547 495: TypePointer UniformConstant 493 548 496: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 494 12 12 549497(samplerposition): 495(ptr) Variable UniformConstant 550 498: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 499 494 41 488 12 44 499 497(samplerposition) 107 551 501: TypePointer Input 27(fvec2) 552 502: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 29 45 12 553 503(inUV): 501(ptr) Variable Input 554 504: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 505 29 41 488 12 44 505 503(inUV) 107 555 512: 7(int) Constant 120 556 510: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 511 75 41 512 12 96 20 557515(samplerNormal): 495(ptr) Variable UniformConstant 558 516: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 517 494 41 512 12 44 517 515(samplerNormal) 107 559 525: 7(int) Constant 121 560 523: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 524 21 41 525 12 96 20 561528(samplerAlbedo): 495(ptr) Variable UniformConstant 562 529: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 530 494 41 525 12 44 530 528(samplerAlbedo) 107 563 534: TypePointer Uniform 98(int) 564 535: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 100 28 12 565 538: 7(int) Constant 124 566 544: 7(int) Constant 125 567 543: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 41 544 13 96 568 555: TypePointer Output 19(fvec4) 569 556: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 21 13 12 570557(outFragColor): 555(ptr) Variable Output 571 560: 7(int) Constant 127 572 558: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 559 21 41 560 12 44 559 557(outFragColor) 107 573 561: 74(fvec3) ConstantComposite 117 117 117 574 568: TypePointer Output 16(float) 575 569: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 18 13 12 576 577: 7(int) Constant 128 577 582: 7(int) Constant 130 578 590: 7(int) Constant 131 579 595: 7(int) Constant 133 580 603: 7(int) Constant 134 581 608: 7(int) Constant 136 582 617: 7(int) Constant 137 583 622: 7(int) Constant 139 584 631: 7(int) Constant 140 585 637: 7(int) Constant 142 586 639: 7(int) Constant 143 587 643: 7(int) Constant 147 588 642: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 88 75 41 643 12 96 20 589 649: 16(float) Constant 1036831949 590 654: 7(int) Constant 149 591 652: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 653 75 41 654 12 96 20 592 661: 7(int) Constant 151 593 660: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 387 100 41 661 12 96 20 594 678: 7(int) Constant 154 595 676: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 677 75 41 678 12 96 20 596 683: TypePointer Uniform 19(fvec4) 597 684: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 21 28 12 598 692: 7(int) Constant 156 599 691: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 167 18 41 692 12 96 20 600 699: 7(int) Constant 157 601 704: 7(int) Constant 160 602 702: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 703 75 41 704 12 96 20 603 714: 7(int) Constant 161 604 719: 7(int) Constant 163 605 717: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 718 18 41 719 12 96 20 606 722: 16(float) Constant 1064781546 607 726: 7(int) Constant 164 608 724: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 725 18 41 726 12 96 20 609 729: 16(float) Constant 1063781322 610 733: 7(int) Constant 165 611 731: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 732 18 41 733 12 96 20 612 736: 16(float) Constant 1120403456 613 740: 7(int) Constant 168 614 738: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 739 75 41 740 12 96 20 615 756: 7(int) Constant 171 616 754: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 755 18 41 756 12 96 20 617 765: 7(int) Constant 172 618 763: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 764 18 41 765 12 96 20 619 775: 7(int) Constant 173 620 773: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 774 18 41 775 12 96 20 621 784: 7(int) Constant 176 622 782: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 783 18 41 784 12 96 20 623 794: 7(int) Constant 177 624 792: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 793 75 41 794 12 96 20 625 802: 7(int) Constant 180 626 800: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 801 75 41 802 12 96 20 627 812: 7(int) Constant 181 628 810: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 811 18 41 812 12 96 20 629 822: 7(int) Constant 182 630 820: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 821 75 41 822 12 96 20 631 826: 16(float) Constant 1098907648 632 831: 16(float) Constant 1075838976 633 836: 7(int) Constant 184 634 844: 98(int) Constant 2 635 861: 7(int) Constant 188 636 867: 7(int) Constant 190 637 868: 7(int) Constant 13 638 866: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 41 867 868 96 639 879: 7(int) Constant 193 640 885: 7(int) Constant 194 641 14(main): 4 Function None 5 642 15: Label 643 485(fragPos): 76(ptr) Variable Function 644 509(normal): 76(ptr) Variable Function 645 522(albedo): 22(ptr) Variable Function 646 562(param): 76(ptr) Variable Function 647 565(param): 76(ptr) Variable Function 648 641(fragcolor): 76(ptr) Variable Function 649 651(N): 76(ptr) Variable Function 650 659(i): 262(ptr) Variable Function 651 675(L): 76(ptr) Variable Function 652 690(dist): 25(ptr) Variable Function 653 701(V): 76(ptr) Variable Function 654716(lightCosInnerAngle): 25(ptr) Variable Function 655723(lightCosOuterAngle): 25(ptr) Variable Function 656 730(lightRange): 25(ptr) Variable Function 657 737(dir): 76(ptr) Variable Function 658 753(cosDir): 25(ptr) Variable Function 659 762(spotEffect): 25(ptr) Variable Function 660772(heightAttenuation): 25(ptr) Variable Function 661 781(NdotL): 25(ptr) Variable Function 662 791(diff): 76(ptr) Variable Function 663 799(R): 76(ptr) Variable Function 664 809(NdotR): 25(ptr) Variable Function 665 819(spec): 76(ptr) Variable Function 666 869(param): 76(ptr) Variable Function 667 873(param): 76(ptr) Variable Function 668 109: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 44 669 110: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 106 106 12 12 670 Store 103(global_var) 108 671 483: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 672 484: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 97 97 12 12 673 482: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 96 14(main) 674 490: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 488 488 12 12 675 489: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 486 485(fragPos) 49 676 500: 493 Load 497(samplerposition) 677 506: 27(fvec2) Load 503(inUV) 678 507: 19(fvec4) ImageSampleImplicitLod 500 506 679 508: 74(fvec3) VectorShuffle 507 507 0 1 2 680 Store 485(fragPos) 508 681 514: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 512 512 12 12 682 513: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 510 509(normal) 49 683 518: 493 Load 515(samplerNormal) 684 519: 27(fvec2) Load 503(inUV) 685 520: 19(fvec4) ImageSampleImplicitLod 518 519 686 521: 74(fvec3) VectorShuffle 520 520 0 1 2 687 Store 509(normal) 521 688 527: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 525 525 12 12 689 526: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 523 522(albedo) 49 690 531: 493 Load 528(samplerAlbedo) 691 532: 27(fvec2) Load 503(inUV) 692 533: 19(fvec4) ImageSampleImplicitLod 531 532 693 Store 522(albedo) 533 694 537: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 538 538 12 12 695 536: 534(ptr) AccessChain 439(ubo) 401 696 539: 98(int) Load 536 697 540: 141(bool) SGreaterThan 539 108 698 SelectionMerge 542 None 699 BranchConditional 540 541 542 700 541: Label 701 546: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 543 702 547: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 544 544 12 12 703 545: 534(ptr) AccessChain 439(ubo) 401 704 548: 98(int) Load 545 705 SelectionMerge 554 None 706 Switch 548 554 707 case 1: 549 708 case 2: 550 709 case 3: 551 710 case 4: 552 711 case 5: 553 712 549: Label 713 563: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 543 714 564: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 560 560 12 12 715 Store 562(param) 561 716 566: 74(fvec3) Load 485(fragPos) 717 Store 565(param) 566 718 567: 74(fvec3) FunctionCall 82(shadow(vf3;vf3;) 562(param) 565(param) 719 570: 568(ptr) AccessChain 557(outFragColor) 12 720 571: 16(float) CompositeExtract 567 0 721 Store 570 571 722 572: 568(ptr) AccessChain 557(outFragColor) 45 723 573: 16(float) CompositeExtract 567 1 724 Store 572 573 725 574: 568(ptr) AccessChain 557(outFragColor) 28 726 575: 16(float) CompositeExtract 567 2 727 Store 574 575 728 576: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 577 577 12 12 729 Branch 554 730 550: Label 731 580: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 543 732 581: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 582 582 12 12 733 579: 74(fvec3) Load 485(fragPos) 734 583: 568(ptr) AccessChain 557(outFragColor) 12 735 584: 16(float) CompositeExtract 579 0 736 Store 583 584 737 585: 568(ptr) AccessChain 557(outFragColor) 45 738 586: 16(float) CompositeExtract 579 1 739 Store 585 586 740 587: 568(ptr) AccessChain 557(outFragColor) 28 741 588: 16(float) CompositeExtract 579 2 742 Store 587 588 743 589: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 590 590 12 12 744 Branch 554 745 551: Label 746 593: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 543 747 594: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 595 595 12 12 748 592: 74(fvec3) Load 509(normal) 749 596: 568(ptr) AccessChain 557(outFragColor) 12 750 597: 16(float) CompositeExtract 592 0 751 Store 596 597 752 598: 568(ptr) AccessChain 557(outFragColor) 45 753 599: 16(float) CompositeExtract 592 1 754 Store 598 599 755 600: 568(ptr) AccessChain 557(outFragColor) 28 756 601: 16(float) CompositeExtract 592 2 757 Store 600 601 758 602: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 603 603 12 12 759 Branch 554 760 552: Label 761 606: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 543 762 607: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 608 608 12 12 763 605: 19(fvec4) Load 522(albedo) 764 609: 74(fvec3) VectorShuffle 605 605 0 1 2 765 610: 568(ptr) AccessChain 557(outFragColor) 12 766 611: 16(float) CompositeExtract 609 0 767 Store 610 611 768 612: 568(ptr) AccessChain 557(outFragColor) 45 769 613: 16(float) CompositeExtract 609 1 770 Store 612 613 771 614: 568(ptr) AccessChain 557(outFragColor) 28 772 615: 16(float) CompositeExtract 609 2 773 Store 614 615 774 616: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 617 617 12 12 775 Branch 554 776 553: Label 777 620: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 543 778 621: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 622 622 12 12 779 619: 19(fvec4) Load 522(albedo) 780 623: 74(fvec3) VectorShuffle 619 619 3 3 3 781 624: 568(ptr) AccessChain 557(outFragColor) 12 782 625: 16(float) CompositeExtract 623 0 783 Store 624 625 784 626: 568(ptr) AccessChain 557(outFragColor) 45 785 627: 16(float) CompositeExtract 623 1 786 Store 626 627 787 628: 568(ptr) AccessChain 557(outFragColor) 28 788 629: 16(float) CompositeExtract 623 2 789 Store 628 629 790 630: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 631 631 12 12 791 Branch 554 792 554: Label 793 635: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 543 794 636: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 637 637 12 12 795 634: 568(ptr) AccessChain 557(outFragColor) 13 796 Store 634 117 797 638: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 639 639 12 12 798 Return 799 542: Label 800 645: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 801 646: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 643 643 12 12 802 644: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 642 641(fragcolor) 49 803 647: 19(fvec4) Load 522(albedo) 804 648: 74(fvec3) VectorShuffle 647 647 0 1 2 805 650: 74(fvec3) VectorTimesScalar 648 649 806 Store 641(fragcolor) 650 807 656: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 654 654 12 12 808 655: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 652 651(N) 49 809 657: 74(fvec3) Load 509(normal) 810 658: 74(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 657 811 Store 651(N) 658 812 663: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 661 661 12 12 813 662: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 660 659(i) 49 814 Store 659(i) 108 815 Branch 664 816 664: Label 817 668: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 818 669: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 661 661 12 12 819 LoopMerge 666 667 None 820 Branch 670 821 670: Label 822 672: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 823 673: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 661 661 12 12 824 671: 98(int) Load 659(i) 825 674: 141(bool) SLessThan 671 401 826 BranchConditional 674 665 666 827 665: Label 828 680: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 829 681: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 678 678 12 12 830 679: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 676 675(L) 49 831 682: 98(int) Load 659(i) 832 685: 683(ptr) AccessChain 439(ubo) 298 682 108 833 686: 19(fvec4) Load 685 834 687: 74(fvec3) VectorShuffle 686 686 0 1 2 835 688: 74(fvec3) Load 485(fragPos) 836 689: 74(fvec3) FSub 687 688 837 Store 675(L) 689 838 694: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 692 692 12 12 839 693: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 691 690(dist) 49 840 695: 74(fvec3) Load 675(L) 841 696: 16(float) ExtInst 3(GLSL.std.450) 66(Length) 695 842 Store 690(dist) 696 843 698: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 699 699 12 12 844 697: 74(fvec3) Load 675(L) 845 700: 74(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 697 846 Store 675(L) 700 847 706: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 704 704 12 12 848 705: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 702 701(V) 49 849 707: 683(ptr) AccessChain 439(ubo) 108 850 708: 19(fvec4) Load 707 851 709: 74(fvec3) VectorShuffle 708 708 0 1 2 852 710: 74(fvec3) Load 485(fragPos) 853 711: 74(fvec3) FSub 709 710 854 Store 701(V) 711 855 713: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 714 714 12 12 856 712: 74(fvec3) Load 701(V) 857 715: 74(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 712 858 Store 701(V) 715 859 721: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 719 719 12 12 860 720: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 717 716(lightCosInnerAngle) 49 861 Store 716(lightCosInnerAngle) 722 862 728: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 726 726 12 12 863 727: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 724 723(lightCosOuterAngle) 49 864 Store 723(lightCosOuterAngle) 729 865 735: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 733 733 12 12 866 734: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 731 730(lightRange) 49 867 Store 730(lightRange) 736 868 742: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 740 740 12 12 869 741: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 738 737(dir) 49 870 743: 98(int) Load 659(i) 871 744: 683(ptr) AccessChain 439(ubo) 298 743 108 872 745: 19(fvec4) Load 744 873 746: 74(fvec3) VectorShuffle 745 745 0 1 2 874 747: 98(int) Load 659(i) 875 748: 683(ptr) AccessChain 439(ubo) 298 747 298 876 749: 19(fvec4) Load 748 877 750: 74(fvec3) VectorShuffle 749 749 0 1 2 878 751: 74(fvec3) FSub 746 750 879 752: 74(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 751 880 Store 737(dir) 752 881 758: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 756 756 12 12 882 757: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 754 753(cosDir) 49 883 759: 74(fvec3) Load 675(L) 884 760: 74(fvec3) Load 737(dir) 885 761: 16(float) Dot 759 760 886 Store 753(cosDir) 761 887 767: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 765 765 12 12 888 766: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 763 762(spotEffect) 49 889 768: 16(float) Load 723(lightCosOuterAngle) 890 769: 16(float) Load 716(lightCosInnerAngle) 891 770: 16(float) Load 753(cosDir) 892 771: 16(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 768 769 770 893 Store 762(spotEffect) 771 894 777: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 775 775 12 12 895 776: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 773 772(heightAttenuation) 49 896 778: 16(float) Load 730(lightRange) 897 779: 16(float) Load 690(dist) 898 780: 16(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 778 200 779 899 Store 772(heightAttenuation) 780 900 786: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 784 784 12 12 901 785: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 782 781(NdotL) 49 902 787: 74(fvec3) Load 651(N) 903 788: 74(fvec3) Load 675(L) 904 789: 16(float) Dot 787 788 905 790: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 200 789 906 Store 781(NdotL) 790 907 796: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 794 794 12 12 908 795: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 792 791(diff) 49 909 797: 16(float) Load 781(NdotL) 910 798: 74(fvec3) CompositeConstruct 797 797 797 911 Store 791(diff) 798 912 804: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 802 802 12 12 913 803: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 800 799(R) 49 914 805: 74(fvec3) Load 675(L) 915 806: 74(fvec3) FNegate 805 916 807: 74(fvec3) Load 651(N) 917 808: 74(fvec3) ExtInst 3(GLSL.std.450) 71(Reflect) 806 807 918 Store 799(R) 808 919 814: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 812 812 12 12 920 813: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 810 809(NdotR) 49 921 815: 74(fvec3) Load 799(R) 922 816: 74(fvec3) Load 701(V) 923 817: 16(float) Dot 815 816 924 818: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 200 817 925 Store 809(NdotR) 818 926 824: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 822 822 12 12 927 823: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 820 819(spec) 49 928 825: 16(float) Load 809(NdotR) 929 827: 16(float) ExtInst 3(GLSL.std.450) 26(Pow) 825 826 930 828: 25(ptr) AccessChain 522(albedo) 13 931 829: 16(float) Load 828 932 830: 16(float) FMul 827 829 933 832: 16(float) FMul 830 831 934 833: 74(fvec3) CompositeConstruct 832 832 832 935 Store 819(spec) 833 936 835: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 836 836 12 12 937 834: 74(fvec3) Load 791(diff) 938 837: 74(fvec3) Load 819(spec) 939 838: 74(fvec3) FAdd 834 837 940 839: 16(float) Load 762(spotEffect) 941 840: 74(fvec3) VectorTimesScalar 838 839 942 841: 16(float) Load 772(heightAttenuation) 943 842: 74(fvec3) VectorTimesScalar 840 841 944 843: 98(int) Load 659(i) 945 845: 683(ptr) AccessChain 439(ubo) 298 843 844 946 846: 19(fvec4) Load 845 947 847: 74(fvec3) VectorShuffle 846 846 0 1 2 948 848: 74(fvec3) FMul 842 847 949 849: 19(fvec4) Load 522(albedo) 950 850: 74(fvec3) VectorShuffle 849 849 0 1 2 951 851: 74(fvec3) FMul 848 850 952 852: 74(fvec3) Load 641(fragcolor) 953 853: 74(fvec3) FAdd 852 851 954 Store 641(fragcolor) 853 955 Branch 667 956 667: Label 957 855: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 958 856: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 661 661 12 12 959 854: 98(int) Load 659(i) 960 857: 98(int) IAdd 854 298 961 Store 659(i) 857 962 Branch 664 963 666: Label 964 859: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 965 860: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 861 861 12 12 966 858: 534(ptr) AccessChain 439(ubo) 844 967 862: 98(int) Load 858 968 863: 141(bool) SGreaterThan 862 108 969 SelectionMerge 865 None 970 BranchConditional 863 864 865 971 864: Label 972 871: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 866 973 872: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 867 867 12 12 974 870: 74(fvec3) Load 641(fragcolor) 975 Store 869(param) 870 976 874: 74(fvec3) Load 485(fragPos) 977 Store 873(param) 874 978 875: 74(fvec3) FunctionCall 82(shadow(vf3;vf3;) 869(param) 873(param) 979 Store 641(fragcolor) 875 980 Branch 865 981 865: Label 982 877: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 96 983 878: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 879 879 12 12 984 876: 74(fvec3) Load 641(fragcolor) 985 880: 16(float) CompositeExtract 876 0 986 881: 16(float) CompositeExtract 876 1 987 882: 16(float) CompositeExtract 876 2 988 883: 19(fvec4) CompositeConstruct 880 881 882 117 989 Store 557(outFragColor) 883 990 884: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 885 885 12 12 991 Return 992 FunctionEnd 99337(textureProj(vf4;f1;vf2;): 16(float) Function None 32 994 34(P): 22(ptr) FunctionParameter 995 35(layer): 25(ptr) FunctionParameter 996 36(offset): 30(ptr) FunctionParameter 997 38: Label 998 112(shadow): 25(ptr) Variable Function 999118(shadowCoord): 22(ptr) Variable Function 1000 165(dist): 25(ptr) Variable Function 1001 50: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 1002 51: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 43 43 12 12 1003 48: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 46 34(P) 49 1004 54: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 52 35(layer) 49 1005 57: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 55 36(offset) 49 1006 111: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 40 37(textureProj(vf4;f1;vf2;) 1007 116: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 114 114 12 12 1008 115: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 113 112(shadow) 49 1009 Store 112(shadow) 117 1010 123: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 121 121 12 12 1011 122: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 119 118(shadowCoord) 49 1012 124: 19(fvec4) Load 34(P) 1013 125: 25(ptr) AccessChain 34(P) 13 1014 126: 16(float) Load 125 1015 127: 19(fvec4) CompositeConstruct 126 126 126 126 1016 128: 19(fvec4) FDiv 124 127 1017 Store 118(shadowCoord) 128 1018 130: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 131 131 12 12 1019 129: 19(fvec4) Load 118(shadowCoord) 1020 132: 27(fvec2) VectorShuffle 129 129 0 1 1021 134: 27(fvec2) VectorTimesScalar 132 133 1022 135: 27(fvec2) CompositeConstruct 133 133 1023 136: 27(fvec2) FAdd 134 135 1024 137: 25(ptr) AccessChain 118(shadowCoord) 12 1025 138: 16(float) CompositeExtract 136 0 1026 Store 137 138 1027 139: 25(ptr) AccessChain 118(shadowCoord) 45 1028 140: 16(float) CompositeExtract 136 1 1029 Store 139 140 1030 145: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 146 146 12 12 1031 144: 25(ptr) AccessChain 118(shadowCoord) 28 1032 147: 16(float) Load 144 1033 149: 141(bool) FOrdGreaterThan 147 148 1034 SelectionMerge 151 None 1035 BranchConditional 149 150 151 1036 150: Label 1037 153: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 1038 154: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 146 146 12 12 1039 152: 25(ptr) AccessChain 118(shadowCoord) 28 1040 155: 16(float) Load 152 1041 156: 141(bool) FOrdLessThan 155 117 1042 Branch 151 1043 151: Label 1044 157: 141(bool) Phi 149 38 156 150 1045 160: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 1046 161: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 146 146 12 12 1047 SelectionMerge 159 None 1048 BranchConditional 157 158 159 1049 158: Label 1050 169: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 162 1051 170: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 163 163 12 12 1052 168: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 166 165(dist) 49 1053 185: 176 Load 182(samplerShadowMap) 1054 186: 19(fvec4) Load 118(shadowCoord) 1055 187: 27(fvec2) VectorShuffle 186 186 0 1 1056 188: 27(fvec2) Load 36(offset) 1057 189: 27(fvec2) FAdd 187 188 1058 190: 16(float) Load 35(layer) 1059 191: 16(float) CompositeExtract 189 0 1060 192: 16(float) CompositeExtract 189 1 1061 193: 74(fvec3) CompositeConstruct 191 192 190 1062 194: 19(fvec4) ImageSampleImplicitLod 185 193 1063 195: 16(float) CompositeExtract 194 0 1064 Store 165(dist) 195 1065 197: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 198 198 12 12 1066 196: 25(ptr) AccessChain 118(shadowCoord) 13 1067 199: 16(float) Load 196 1068 201: 141(bool) FOrdGreaterThan 199 200 1069 SelectionMerge 203 None 1070 BranchConditional 201 202 203 1071 202: Label 1072 205: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 162 1073 206: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 198 198 12 12 1074 204: 16(float) Load 165(dist) 1075 207: 25(ptr) AccessChain 118(shadowCoord) 28 1076 208: 16(float) Load 207 1077 209: 141(bool) FOrdLessThan 204 208 1078 Branch 203 1079 203: Label 1080 210: 141(bool) Phi 201 158 209 202 1081 213: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 162 1082 214: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 198 198 12 12 1083 SelectionMerge 212 None 1084 BranchConditional 210 211 212 1085 211: Label 1086 219: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 215 1087 220: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 216 216 12 12 1088 Store 112(shadow) 218 1089 Branch 212 1090 212: Label 1091 Branch 159 1092 159: Label 1093 222: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40 1094 223: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 224 224 12 12 1095 221: 16(float) Load 112(shadow) 1096 ReturnValue 221 1097 FunctionEnd 109862(filterPCF(vf4;f1;): 16(float) Function None 58 1099 60(sc): 22(ptr) FunctionParameter 1100 61(layer): 25(ptr) FunctionParameter 1101 63: Label 1102 235(texDim): 233(ptr) Variable Function 1103 247(scale): 25(ptr) Variable Function 1104 254(dx): 25(ptr) Variable Function 1105 268(dy): 25(ptr) Variable Function 1106280(shadowFactor): 25(ptr) Variable Function 1107 286(count): 262(ptr) Variable Function 1108 292(range): 262(ptr) Variable Function 1109 299(x): 262(ptr) Variable Function 1110 319(y): 262(ptr) Variable Function 1111 352(param): 22(ptr) Variable Function 1112 354(param): 25(ptr) Variable Function 1113 356(param): 30(ptr) Variable Function 1114 70: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 65 1115 71: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 66 66 12 12 1116 69: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 67 60(sc) 49 1117 73: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 72 61(layer) 49 1118 230: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 65 62(filterPCF(vf4;f1;) 1119 240: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 238 238 12 12 1120 239: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 236 235(texDim) 49 1121 241: 176 Load 182(samplerShadowMap) 1122 242: 171 Image 241 1123 245: 243(ivec3) ImageQuerySizeLod 242 108 1124 246: 231(ivec2) VectorShuffle 245 245 0 1 1125 Store 235(texDim) 246 1126 252: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 250 250 12 12 1127 251: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 248 247(scale) 49 1128 Store 247(scale) 253 1129 259: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 257 257 12 12 1130 258: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 255 254(dx) 49 1131 260: 16(float) Load 247(scale) 1132 261: 16(float) FMul 260 117 1133 264: 262(ptr) AccessChain 235(texDim) 12 1134 265: 98(int) Load 264 1135 266: 16(float) ConvertSToF 265 1136 267: 16(float) FDiv 261 266 1137 Store 254(dx) 267 1138 273: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 271 271 12 12 1139 272: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 269 268(dy) 49 1140 274: 16(float) Load 247(scale) 1141 275: 16(float) FMul 274 117 1142 276: 262(ptr) AccessChain 235(texDim) 45 1143 277: 98(int) Load 276 1144 278: 16(float) ConvertSToF 277 1145 279: 16(float) FDiv 275 278 1146 Store 268(dy) 279 1147 285: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 283 283 12 12 1148 284: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 281 280(shadowFactor) 49 1149 Store 280(shadowFactor) 200 1150 291: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 289 289 12 12 1151 290: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 287 286(count) 49 1152 Store 286(count) 108 1153 297: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 295 295 12 12 1154 296: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 293 292(range) 49 1155 Store 292(range) 298 1156 304: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 302 302 12 12 1157 303: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 300 299(x) 49 1158 305: 98(int) Load 292(range) 1159 306: 98(int) SNegate 305 1160 Store 299(x) 306 1161 Branch 307 1162 307: Label 1163 311: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 65 1164 312: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 302 302 12 12 1165 LoopMerge 309 310 None 1166 Branch 313 1167 313: Label 1168 315: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 65 1169 316: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 302 302 12 12 1170 314: 98(int) Load 299(x) 1171 317: 98(int) Load 292(range) 1172 318: 141(bool) SLessThanEqual 314 317 1173 BranchConditional 318 308 309 1174 308: Label 1175 324: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 65 1176 325: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 322 322 12 12 1177 323: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 320 319(y) 49 1178 326: 98(int) Load 292(range) 1179 327: 98(int) SNegate 326 1180 Store 319(y) 327 1181 Branch 328 1182 328: Label 1183 332: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 65 1184 333: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 322 322 12 12 1185 LoopMerge 330 331 None 1186 Branch 334 1187 334: Label 1188 336: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 65 1189 337: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 322 322 12 12 1190 335: 98(int) Load 319(y) 1191 338: 98(int) Load 292(range) 1192 339: 141(bool) SLessThanEqual 335 338 1193 BranchConditional 339 329 330 1194 329: Label 1195 341: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 65 1196 342: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 343 343 12 12 1197 340: 16(float) Load 254(dx) 1198 344: 98(int) Load 299(x) 1199 345: 16(float) ConvertSToF 344 1200 346: 16(float) FMul 340 345 1201 347: 16(float) Load 268(dy) 1202 348: 98(int) Load 319(y) 1203 349: 16(float) ConvertSToF 348 1204 350: 16(float) FMul 347 349 1205 351: 27(fvec2) CompositeConstruct 346 350 1206 353: 19(fvec4) Load 60(sc) 1207 Store 352(param) 353 1208 355: 16(float) Load 61(layer) 1209 Store 354(param) 355 1210 Store 356(param) 351 1211 357: 16(float) FunctionCall 37(textureProj(vf4;f1;vf2;) 352(param) 354(param) 356(param) 1212 358: 16(float) Load 280(shadowFactor) 1213 359: 16(float) FAdd 358 357 1214 Store 280(shadowFactor) 359 1215 361: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 362 362 12 12 1216 360: 98(int) Load 286(count) 1217 363: 98(int) IAdd 360 298 1218 Store 286(count) 363 1219 Branch 331 1220 331: Label 1221 365: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 65 1222 366: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 322 322 12 12 1223 364: 98(int) Load 319(y) 1224 367: 98(int) IAdd 364 298 1225 Store 319(y) 367 1226 Branch 328 1227 330: Label 1228 Branch 310 1229 310: Label 1230 369: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 65 1231 370: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 302 302 12 12 1232 368: 98(int) Load 299(x) 1233 371: 98(int) IAdd 368 298 1234 Store 299(x) 371 1235 Branch 307 1236 309: Label 1237 373: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 65 1238 374: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 375 375 12 12 1239 372: 16(float) Load 280(shadowFactor) 1240 376: 98(int) Load 286(count) 1241 377: 16(float) ConvertSToF 376 1242 378: 16(float) FDiv 372 377 1243 ReturnValue 378 1244 FunctionEnd 124582(shadow(vf3;vf3;): 74(fvec3) Function None 78 1246 80(fragcolor): 76(ptr) FunctionParameter 1247 81(fragpos): 76(ptr) FunctionParameter 1248 83: Label 1249 385(i): 262(ptr) Variable Function 1250 403(shadowClip): 22(ptr) Variable Function 1251453(shadowFactor): 25(ptr) Variable Function 1252 460(param): 22(ptr) Variable Function 1253 462(param): 25(ptr) Variable Function 1254 90: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 85 1255 91: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 86 86 12 12 1256 89: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 87 80(fragcolor) 49 1257 94: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 92 81(fragpos) 49 1258 384: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 85 82(shadow(vf3;vf3;) 1259 390: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 388 388 12 12 1260 389: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 386 385(i) 49 1261 Store 385(i) 108 1262 Branch 391 1263 391: Label 1264 395: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 85 1265 396: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 388 388 12 12 1266 LoopMerge 393 394 None 1267 Branch 397 1268 397: Label 1269 399: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 85 1270 400: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 388 388 12 12 1271 398: 98(int) Load 385(i) 1272 402: 141(bool) SLessThan 398 401 1273 BranchConditional 402 392 393 1274 392: Label 1275 408: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 85 1276 409: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 406 406 12 12 1277 407: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 404 403(shadowClip) 49 1278 442: 98(int) Load 385(i) 1279 445: 443(ptr) AccessChain 439(ubo) 298 442 401 1280 446: 410 Load 445 1281 447: 74(fvec3) Load 81(fragpos) 1282 448: 16(float) CompositeExtract 447 0 1283 449: 16(float) CompositeExtract 447 1 1284 450: 16(float) CompositeExtract 447 2 1285 451: 19(fvec4) CompositeConstruct 448 449 450 117 1286 452: 19(fvec4) MatrixTimesVector 446 451 1287 Store 403(shadowClip) 452 1288 457: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 455 455 12 12 1289 456: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 454 453(shadowFactor) 49 1290 458: 98(int) Load 385(i) 1291 459: 16(float) ConvertSToF 458 1292 461: 19(fvec4) Load 403(shadowClip) 1293 Store 460(param) 461 1294 Store 462(param) 459 1295 463: 16(float) FunctionCall 62(filterPCF(vf4;f1;) 460(param) 462(param) 1296 Store 453(shadowFactor) 463 1297 465: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 466 466 12 12 1298 464: 16(float) Load 453(shadowFactor) 1299 467: 74(fvec3) Load 80(fragcolor) 1300 468: 74(fvec3) VectorTimesScalar 467 464 1301 Store 80(fragcolor) 468 1302 Branch 394 1303 394: Label 1304 470: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 85 1305 471: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 388 388 12 12 1306 469: 98(int) Load 385(i) 1307 472: 98(int) IAdd 469 298 1308 Store 385(i) 472 1309 Branch 391 1310 393: Label 1311 474: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 85 1312 475: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 476 476 12 12 1313 473: 74(fvec3) Load 80(fragcolor) 1314 ReturnValue 473 1315 FunctionEnd 1316