blob: d8367e1098a435fd6e223a465cdfebbd826a1871 [file] [log] [blame]
spv.debuginfo.hlsl.frag
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 931
Capability Shader
Capability ImageQuery
Extension "SPV_KHR_non_semantic_info"
1: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
3: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 6 "main" 924 927
ExecutionMode 6 OriginUpperLeft
2: String "spv.debuginfo.hlsl.frag"
9: String "float"
12: String "uint"
38: String "textureProj"
41: String "// OpModuleProcessed auto-map-locations
// OpModuleProcessed auto-map-bindings
// OpModuleProcessed entry-point main
// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed keep-uncalled
// OpModuleProcessed hlsl-offsets
#line 1
/*
The MIT License (MIT)
Copyright (c) 2022 Google LLC
Copyright (c) 2022 Sascha Willems
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
Texture2D textureposition : register(t1);
SamplerState samplerposition : register(s1);
Texture2D textureNormal : register(t2);
SamplerState samplerNormal : register(s2);
Texture2D textureAlbedo : register(t3);
SamplerState samplerAlbedo : register(s3);
// Depth from the light's point of view
//layout (binding = 5) uniform sampler2DShadow samplerShadowMap;
Texture2DArray textureShadowMap : register(t5);
SamplerState samplerShadowMap : register(s5);
#define LIGHT_COUNT 3
#define SHADOW_FACTOR 0.25
#define AMBIENT_LIGHT 0.1
#define USE_PCF
struct Light
{
float4 position;
float4 target;
float4 color;
float4x4 viewMatrix;
};
struct UBO
{
float4 viewPos;
Light lights[LIGHT_COUNT];
int useShadows;
int displayDebugTarget;
};
cbuffer ubo : register(b4) { UBO ubo; }
float textureProj(float4 P, float layer, float2 offset)
{
float shadow = 1.0;
float4 shadowCoord = P / P.w;
shadowCoord.xy = shadowCoord.xy * 0.5 + 0.5;
if (shadowCoord.z > -1.0 && shadowCoord.z < 1.0)
{
float dist = textureShadowMap.Sample(samplerShadowMap, float3(shadowCoord.xy + offset, layer)).r;
if (shadowCoord.w > 0.0 && dist < shadowCoord.z)
{
shadow = SHADOW_FACTOR;
}
}
return shadow;
}
float filterPCF(float4 sc, float layer)
{
int2 texDim; int elements; int levels;
textureShadowMap.GetDimensions(0, texDim.x, texDim.y, elements, levels);
float scale = 1.5;
float dx = scale * 1.0 / float(texDim.x);
float dy = scale * 1.0 / float(texDim.y);
float shadowFactor = 0.0;
int count = 0;
int range = 1;
for (int x = -range; x <= range; x++)
{
for (int y = -range; y <= range; y++)
{
shadowFactor += textureProj(sc, layer, float2(dx*x, dy*y));
count++;
}
}
return shadowFactor / count;
}
float3 shadow(float3 fragcolor, float3 fragPos) {
for (int i = 0; i < LIGHT_COUNT; ++i)
{
float4 shadowClip = mul(ubo.lights[i].viewMatrix, float4(fragPos.xyz, 1.0));
float shadowFactor;
#ifdef USE_PCF
shadowFactor= filterPCF(shadowClip, i);
#else
shadowFactor = textureProj(shadowClip, i, float2(0.0, 0.0));
#endif
fragcolor *= shadowFactor;
}
return fragcolor;
}
float4 main([[vk::location(0)]] float2 inUV : TEXCOORD0) : SV_TARGET
{
// Get G-Buffer values
float3 fragPos = textureposition.Sample(samplerposition, inUV).rgb;
float3 normal = textureNormal.Sample(samplerNormal, inUV).rgb;
float4 albedo = textureAlbedo.Sample(samplerAlbedo, inUV);
float3 fragcolor;
// Debug display
if (ubo.displayDebugTarget > 0) {
switch (ubo.displayDebugTarget) {
case 1:
fragcolor.rgb = shadow(float3(1.0, 1.0, 1.0), fragPos);
break;
case 2:
fragcolor.rgb = fragPos;
break;
case 3:
fragcolor.rgb = normal;
break;
case 4:
fragcolor.rgb = albedo.rgb;
break;
case 5:
fragcolor.rgb = albedo.aaa;
break;
}
return float4(fragcolor, 1.0);
}
// Ambient part
fragcolor = albedo.rgb * AMBIENT_LIGHT;
float3 N = normalize(normal);
for(int i = 0; i < LIGHT_COUNT; ++i)
{
// Vector to light
float3 L = ubo.lights[i].position.xyz - fragPos;
// Distance from light to fragment position
float dist = length(L);
L = normalize(L);
// Viewer to fragment
float3 V = ubo.viewPos.xyz - fragPos;
V = normalize(V);
float lightCosInnerAngle = cos(radians(15.0));
float lightCosOuterAngle = cos(radians(25.0));
float lightRange = 100.0;
// Direction vector from source to target
float3 dir = normalize(ubo.lights[i].position.xyz - ubo.lights[i].target.xyz);
// Dual cone spot light with smooth transition between inner and outer angle
float cosDir = dot(L, dir);
float spotEffect = smoothstep(lightCosOuterAngle, lightCosInnerAngle, cosDir);
float heightAttenuation = smoothstep(lightRange, 0.0f, dist);
// Diffuse lighting
float NdotL = max(0.0, dot(N, L));
float3 diff = NdotL.xxx;
// Specular lighting
float3 R = reflect(-L, N);
float NdotR = max(0.0, dot(R, V));
float3 spec = (pow(NdotR, 16.0) * albedo.a * 2.5).xxx;
fragcolor += float3((diff + spec) * spotEffect * heightAttenuation) * ubo.lights[i].color.rgb * albedo.rgb;
}
// Shadow calculations in a separate pass
if (ubo.useShadows > 0)
{
fragcolor = shadow(fragcolor, fragPos);
}
return float4(fragcolor, 1);
}
"
47: String "P"
53: String "layer"
56: String "offset"
64: String "filterPCF"
68: String "sc"
84: String "shadow"
88: String "fragcolor"
93: String "fragPos"
100: String "@main"
104: String "inUV"
119: String "shadowCoord"
146: String "bool"
158: String "dist"
165: String "type.2d.image"
166: String "@type.2d.image"
172: String "textureShadowMap"
177: String "type.sampler"
178: String "@type.sampler"
183: String "samplerShadowMap"
187: String "type.sampled.image"
188: String "@type.sampled.image"
229: String "int"
237: String "texDim"
246: String "elements"
250: String "levels"
258: String "sizeQueryTemp"
282: String "scale"
289: String "dx"
301: String "dy"
313: String "shadowFactor"
319: String "count"
326: String "range"
336: String "x"
360: String "y"
428: String "i"
447: String "shadowClip"
462: String "color"
468: String "viewMatrix"
472: String "Light"
478: String "lights"
481: String "displayDebugTarget"
486: String "UBO"
489: String "ubo"
497: String ""
548: String "textureposition"
553: String "samplerposition"
563: String "normal"
569: String "textureNormal"
574: String "samplerNormal"
582: String "albedo"
588: String "textureAlbedo"
593: String "samplerAlbedo"
684: String "N"
712: String "L"
738: String "V"
753: String "lightCosInnerAngle"
760: String "lightCosOuterAngle"
767: String "lightRange"
774: String "dir"
790: String "cosDir"
799: String "spotEffect"
809: String "heightAttenuation"
818: String "NdotL"
828: String "diff"
836: String "R"
846: String "NdotR"
856: String "spec"
Name 6 "main"
Name 36 "textureProj(vf4;f1;vf2;"
Name 33 "P"
Name 34 "layer"
Name 35 "offset"
Name 62 "filterPCF(vf4;f1;"
Name 60 "sc"
Name 61 "layer"
Name 82 "shadow(vf3;vf3;"
Name 80 "fragcolor"
Name 81 "fragPos"
Name 98 "@main(vf2;"
Name 97 "inUV"
Name 110 "shadow"
Name 117 "shadowCoord"
Name 156 "dist"
Name 170 "textureShadowMap"
Name 181 "samplerShadowMap"
Name 235 "texDim"
Name 244 "elements"
Name 248 "levels"
Name 256 "sizeQueryTemp"
Name 280 "scale"
Name 287 "dx"
Name 299 "dy"
Name 311 "shadowFactor"
Name 317 "count"
Name 324 "range"
Name 334 "x"
Name 358 "y"
Name 391 "param"
Name 393 "param"
Name 395 "param"
Name 426 "i"
Name 445 "shadowClip"
Name 460 "Light"
MemberName 460(Light) 0 "position"
MemberName 460(Light) 1 "target"
MemberName 460(Light) 2 "color"
MemberName 460(Light) 3 "viewMatrix"
Name 475 "UBO"
MemberName 475(UBO) 0 "viewPos"
MemberName 475(UBO) 1 "lights"
MemberName 475(UBO) 2 "useShadows"
MemberName 475(UBO) 3 "displayDebugTarget"
Name 487 "ubo"
MemberName 487(ubo) 0 "ubo"
Name 495 ""
Name 504 "shadowFactor"
Name 513 "param"
Name 515 "param"
Name 536 "fragPos"
Name 546 "textureposition"
Name 551 "samplerposition"
Name 561 "normal"
Name 567 "textureNormal"
Name 572 "samplerNormal"
Name 580 "albedo"
Name 586 "textureAlbedo"
Name 591 "samplerAlbedo"
Name 598 "fragcolor"
Name 625 "param"
Name 629 "param"
Name 682 "N"
Name 693 "i"
Name 710 "L"
Name 725 "dist"
Name 736 "V"
Name 751 "lightCosInnerAngle"
Name 758 "lightCosOuterAngle"
Name 765 "lightRange"
Name 772 "dir"
Name 788 "cosDir"
Name 797 "spotEffect"
Name 807 "heightAttenuation"
Name 816 "NdotL"
Name 826 "diff"
Name 834 "R"
Name 844 "NdotR"
Name 854 "spec"
Name 902 "param"
Name 907 "param"
Name 922 "inUV"
Name 924 "inUV"
Name 927 "@entryPointOutput"
Name 928 "param"
Decorate 170(textureShadowMap) Binding 5
Decorate 170(textureShadowMap) DescriptorSet 0
Decorate 181(samplerShadowMap) Binding 5
Decorate 181(samplerShadowMap) DescriptorSet 0
MemberDecorate 460(Light) 0 Offset 0
MemberDecorate 460(Light) 1 Offset 16
MemberDecorate 460(Light) 2 Offset 32
MemberDecorate 460(Light) 3 RowMajor
MemberDecorate 460(Light) 3 MatrixStride 16
MemberDecorate 460(Light) 3 Offset 48
Decorate 473 ArrayStride 112
MemberDecorate 475(UBO) 0 Offset 0
MemberDecorate 475(UBO) 1 Offset 16
MemberDecorate 475(UBO) 2 Offset 352
MemberDecorate 475(UBO) 3 Offset 356
Decorate 487(ubo) Block
MemberDecorate 487(ubo) 0 Offset 0
Decorate 495 Binding 4
Decorate 495 DescriptorSet 0
Decorate 546(textureposition) Binding 1
Decorate 546(textureposition) DescriptorSet 0
Decorate 551(samplerposition) Binding 1
Decorate 551(samplerposition) DescriptorSet 0
Decorate 567(textureNormal) Binding 2
Decorate 567(textureNormal) DescriptorSet 0
Decorate 572(samplerNormal) Binding 2
Decorate 572(samplerNormal) DescriptorSet 0
Decorate 586(textureAlbedo) Binding 3
Decorate 586(textureAlbedo) DescriptorSet 0
Decorate 591(samplerAlbedo) Binding 3
Decorate 591(samplerAlbedo) DescriptorSet 0
Decorate 924(inUV) Location 0
Decorate 927(@entryPointOutput) Location 0
4: TypeVoid
5: TypeFunction 4
8: TypeFloat 32
11: TypeInt 32 0
14: 11(int) Constant 32
15: 11(int) Constant 6
16: 11(int) Constant 0
13: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16
17: 11(int) Constant 3
10: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16
18: TypeVector 8(float) 4
19: 11(int) Constant 4
20: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 19
21: TypePointer Function 18(fvec4)
22: 11(int) Constant 7
23: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 20 22 16
24: TypePointer Function 8(float)
25: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 10 22 16
26: TypeVector 8(float) 2
27: 11(int) Constant 2
28: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 27
29: TypePointer Function 26(fvec2)
30: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 28 22 16
31: TypeFunction 8(float) 21(ptr) 24(ptr) 29(ptr)
32: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 10 20 10 28
40: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 2 41
42: 11(int) Constant 61
44: 11(int) Constant 1
45: 11(int) Constant 5
43: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 44 19 40 45
39: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 38 32 40 42 16 43 38 17 42
46: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 20 40 42 16 39 19 44
49: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
52: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 53 10 40 42 16 39 19 27
55: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 56 28 40 42 16 39 19 17
58: TypeFunction 8(float) 21(ptr) 24(ptr)
59: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 10 20 10
66: 11(int) Constant 78
65: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 64 59 40 66 16 43 64 17 66
67: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 68 20 40 66 16 65 19 44
72: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 53 10 40 66 16 65 19 27
74: TypeVector 8(float) 3
75: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17
76: TypePointer Function 74(fvec3)
77: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 75 22 16
78: TypeFunction 74(fvec3) 76(ptr) 76(ptr)
79: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 75 75 75
86: 11(int) Constant 101
85: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 84 79 40 86 16 43 84 17 86
87: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 88 75 40 86 16 85 19 44
92: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 93 75 40 86 16 85 19 27
95: TypeFunction 18(fvec4) 29(ptr)
96: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 20 28
102: 11(int) Constant 119
101: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 100 96 40 102 16 43 100 17 102
103: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 104 28 40 102 16 101 19 44
109: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 39
112: 11(int) Constant 62
111: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 84 10 40 112 16 109 19
116: 8(float) Constant 1065353216
120: 11(int) Constant 63
118: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 119 20 40 120 16 109 19
130: 11(int) Constant 64
132: 8(float) Constant 1056964608
142: 11(int) Constant 66
144: 8(float) Constant 3212836864
145: TypeBool
147: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 146 14 27 16
155: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 109
159: 11(int) Constant 68
157: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 158 10 40 159 16 155 19
163: TypeImage 8(float) 2D array sampled format:Unknown
167: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone)
164: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 165 16 40 159 16 43 166 167 17
168: TypePointer UniformConstant 163
169: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 164 16 16
170(textureShadowMap): 168(ptr) Variable UniformConstant
173: 11(int) Constant 8
171: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 172 164 40 159 16 43 172 170(textureShadowMap) 173
175: TypeSampler
176: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 177 44 40 159 16 43 178 167 17
179: TypePointer UniformConstant 175
180: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 176 16 16
181(samplerShadowMap): 179(ptr) Variable UniformConstant
182: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 183 176 40 159 16 43 183 181(samplerShadowMap) 173
185: TypeSampledImage 163
186: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 187 16 40 159 16 43 188 167 17
202: 11(int) Constant 69
204: 8(float) Constant 0
213: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 155
214: 8(float) Constant 1048576000
217: 11(int) Constant 71
221: 11(int) Constant 74
227: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 65
228: TypeInt 32 1
230: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 229 14 19 16
231: TypeVector 228(int) 2
232: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 230 27
233: TypePointer Function 231(ivec2)
234: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 232 22 16
238: 11(int) Constant 79
236: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 237 232 40 238 16 227 19
242: TypePointer Function 228(int)
243: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 230 22 16
245: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 246 230 40 238 16 227 19
249: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 250 230 40 238 16 227 19
252: TypeVector 11(int) 3
253: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 13 17
254: TypePointer Function 252(ivec3)
255: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 253 22 16
259: 11(int) Constant 80
257: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 258 253 40 259 16 227 19
264: TypePointer Function 11(int)
265: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 13 22 16
283: 11(int) Constant 81
281: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 282 10 40 283 16 227 19
286: 8(float) Constant 1069547520
290: 11(int) Constant 82
288: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 289 10 40 290 16 227 19
302: 11(int) Constant 83
300: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 301 10 40 302 16 227 19
314: 11(int) Constant 85
312: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 313 10 40 314 16 227 19
320: 11(int) Constant 86
318: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 319 230 40 320 16 227 19
323: 228(int) Constant 0
327: 11(int) Constant 87
325: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 326 230 40 327 16 227 19
330: 228(int) Constant 1
332: 11(int) Constant 89
333: 11(int) Constant 11
331: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 332 333 227
335: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 336 230 40 332 16 331 19
354: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 331
356: 11(int) Constant 91
357: 11(int) Constant 12
355: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 356 357 354
359: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 360 230 40 356 16 355 19
378: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 355
382: 11(int) Constant 93
401: 11(int) Constant 94
414: 11(int) Constant 98
423: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 85
425: 11(int) Constant 102
424: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 425 333 423
427: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 428 230 40 425 16 424 19
442: 228(int) Constant 3
444: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 424
448: 11(int) Constant 104
446: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 447 20 40 448 16 444 19
457: TypeMatrix 18(fvec4) 4
459: 145(bool) ConstantTrue
458: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 20 19 459
460(Light): TypeStruct 18(fvec4) 18(fvec4) 18(fvec4) 457
463: 11(int) Constant 46
464: 11(int) Constant 14
461: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 462 20 40 463 464 16 16 17
465: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 462 20 40 463 464 16 16 17
466: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 462 20 40 463 464 16 16 17
469: 11(int) Constant 47
470: 11(int) Constant 21
467: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 468 458 40 469 470 16 16 17
471: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 472 44 40 448 16 43 472 16 17 461 465 466 467
473: TypeArray 460(Light) 17
474: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 471 17
475(UBO): TypeStruct 18(fvec4) 473 228(int) 228(int)
476: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 462 20 40 463 464 16 16 17
479: 11(int) Constant 53
477: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 478 474 40 479 464 16 16 17
482: 11(int) Constant 55
483: 11(int) Constant 24
480: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 481 230 40 482 483 16 16 17
484: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 481 230 40 482 483 16 16 17
485: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 486 44 40 448 16 43 486 16 17 476 477 480 484
487(ubo): TypeStruct 475(UBO)
490: 11(int) Constant 58
491: 11(int) Constant 37
488: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 489 485 40 490 491 16 16 17
492: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 489 44 40 448 16 43 489 16 17 488
493: TypePointer Uniform 487(ubo)
494: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 492 27 16
495: 493(ptr) Variable Uniform
496: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 497 492 40 448 16 43 497 495 173
499: TypePointer Uniform 457
500: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 458 27 16
506: 11(int) Constant 106
505: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 313 10 40 506 16 444 19
511: 11(int) Constant 108
519: 11(int) Constant 113
529: 11(int) Constant 115
535: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 101
538: 11(int) Constant 121
537: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 93 75 40 538 16 535 19
542: TypeImage 8(float) 2D sampled format:Unknown
543: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 165 16 40 538 16 43 166 167 17
544: TypePointer UniformConstant 542
545: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 543 16 16
546(textureposition): 544(ptr) Variable UniformConstant
547: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 548 543 40 538 16 43 548 546(textureposition) 173
550: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 177 44 40 538 16 43 178 167 17
551(samplerposition): 179(ptr) Variable UniformConstant
552: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 553 550 40 538 16 43 553 551(samplerposition) 173
555: TypeSampledImage 542
556: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 187 16 40 538 16 43 188 167 17
564: 11(int) Constant 122
562: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 563 75 40 564 16 535 19
567(textureNormal): 544(ptr) Variable UniformConstant
568: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 569 543 40 564 16 43 569 567(textureNormal) 173
571: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 177 44 40 564 16 43 178 167 17
572(samplerNormal): 179(ptr) Variable UniformConstant
573: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 574 571 40 564 16 43 574 572(samplerNormal) 173
583: 11(int) Constant 123
581: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 582 20 40 583 16 535 19
586(textureAlbedo): 544(ptr) Variable UniformConstant
587: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 588 543 40 583 16 43 588 586(textureAlbedo) 173
590: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 177 44 40 583 16 43 178 167 17
591(samplerAlbedo): 179(ptr) Variable UniformConstant
592: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 593 590 40 583 16 43 593 591(samplerAlbedo) 173
600: 11(int) Constant 125
599: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 88 75 40 600 16 535 19
603: TypePointer Uniform 228(int)
604: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 230 27 16
607: 11(int) Constant 128
612: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 535
616: 11(int) Constant 129
624: 74(fvec3) ConstantComposite 116 116 116
628: 11(int) Constant 131
633: 11(int) Constant 132
638: 11(int) Constant 134
640: 11(int) Constant 135
645: 11(int) Constant 137
647: 11(int) Constant 138
652: 11(int) Constant 140
655: 11(int) Constant 141
660: 11(int) Constant 143
663: 11(int) Constant 144
669: 11(int) Constant 146
678: 11(int) Constant 150
680: 8(float) Constant 1036831949
685: 11(int) Constant 152
683: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 684 75 40 685 16 535 19
691: 11(int) Constant 154
692: 11(int) Constant 10
690: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 691 692 535
694: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 428 230 40 691 16 690 19
709: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 690
713: 11(int) Constant 157
711: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 712 75 40 713 16 709 19
718: TypePointer Uniform 18(fvec4)
719: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 20 27 16
727: 11(int) Constant 159
726: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 158 10 40 727 16 709 19
734: 11(int) Constant 160
739: 11(int) Constant 163
737: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 738 75 40 739 16 709 19
749: 11(int) Constant 164
754: 11(int) Constant 166
752: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 753 10 40 754 16 709 19
757: 8(float) Constant 1064781546
761: 11(int) Constant 167
759: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 760 10 40 761 16 709 19
764: 8(float) Constant 1063781322
768: 11(int) Constant 168
766: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 767 10 40 768 16 709 19
771: 8(float) Constant 1120403456
775: 11(int) Constant 171
773: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 774 75 40 775 16 709 19
791: 11(int) Constant 174
789: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 790 10 40 791 16 709 19
800: 11(int) Constant 175
798: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 799 10 40 800 16 709 19
810: 11(int) Constant 176
808: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 809 10 40 810 16 709 19
819: 11(int) Constant 179
817: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 818 10 40 819 16 709 19
829: 11(int) Constant 180
827: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 828 75 40 829 16 709 19
837: 11(int) Constant 183
835: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 836 75 40 837 16 709 19
847: 11(int) Constant 184
845: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 846 10 40 847 16 709 19
857: 11(int) Constant 185
855: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 856 75 40 857 16 709 19
861: 8(float) Constant 1098907648
866: 8(float) Constant 1075838976
871: 11(int) Constant 187
879: 228(int) Constant 2
896: 11(int) Constant 191
901: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 21(DebugLexicalBlock) 40 16 16 535
906: 11(int) Constant 193
913: 11(int) Constant 196
923: TypePointer Input 26(fvec2)
924(inUV): 923(ptr) Variable Input
926: TypePointer Output 18(fvec4)
927(@entryPointOutput): 926(ptr) Variable Output
6(main): 4 Function None 5
7: Label
922(inUV): 29(ptr) Variable Function
928(param): 29(ptr) Variable Function
925: 26(fvec2) Load 924(inUV)
Store 922(inUV) 925
929: 26(fvec2) Load 922(inUV)
Store 928(param) 929
930: 18(fvec4) FunctionCall 98(@main(vf2;) 928(param)
Store 927(@entryPointOutput) 930
Return
FunctionEnd
36(textureProj(vf4;f1;vf2;): 8(float) Function None 31
33(P): 21(ptr) FunctionParameter
34(layer): 24(ptr) FunctionParameter
35(offset): 29(ptr) FunctionParameter
37: Label
110(shadow): 24(ptr) Variable Function
117(shadowCoord): 21(ptr) Variable Function
156(dist): 24(ptr) Variable Function
50: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 39
51: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 42 42 16 16
48: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 46 33(P) 49
54: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 52 34(layer) 49
57: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 55 35(offset) 49
108: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 39 36(textureProj(vf4;f1;vf2;)
114: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 109
115: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 112 112 16 16
113: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 111 110(shadow) 49
Store 110(shadow) 116
122: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 120 120 16 16
121: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 118 117(shadowCoord) 49
123: 18(fvec4) Load 33(P)
124: 24(ptr) AccessChain 33(P) 17
125: 8(float) Load 124
126: 18(fvec4) CompositeConstruct 125 125 125 125
127: 18(fvec4) FDiv 123 126
Store 117(shadowCoord) 127
129: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 130 130 16 16
128: 18(fvec4) Load 117(shadowCoord)
131: 26(fvec2) VectorShuffle 128 128 0 1
133: 26(fvec2) VectorTimesScalar 131 132
134: 26(fvec2) CompositeConstruct 132 132
135: 26(fvec2) FAdd 133 134
136: 24(ptr) AccessChain 117(shadowCoord) 16
137: 8(float) CompositeExtract 135 0
Store 136 137
138: 24(ptr) AccessChain 117(shadowCoord) 44
139: 8(float) CompositeExtract 135 1
Store 138 139
141: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 142 142 16 16
140: 24(ptr) AccessChain 117(shadowCoord) 27
143: 8(float) Load 140
148: 145(bool) FOrdGreaterThan 143 144
149: 24(ptr) AccessChain 117(shadowCoord) 27
150: 8(float) Load 149
151: 145(bool) FOrdLessThan 150 116
152: 145(bool) LogicalAnd 148 151
SelectionMerge 154 None
BranchConditional 152 153 154
153: Label
161: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 155
162: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 159 159 16 16
160: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 157 156(dist) 49
174: 163 Load 170(textureShadowMap)
184: 175 Load 181(samplerShadowMap)
189: 185 SampledImage 174 184
190: 18(fvec4) Load 117(shadowCoord)
191: 26(fvec2) VectorShuffle 190 190 0 1
192: 26(fvec2) Load 35(offset)
193: 26(fvec2) FAdd 191 192
194: 8(float) Load 34(layer)
195: 8(float) CompositeExtract 193 0
196: 8(float) CompositeExtract 193 1
197: 74(fvec3) CompositeConstruct 195 196 194
198: 18(fvec4) ImageSampleImplicitLod 189 197
199: 8(float) CompositeExtract 198 0
Store 156(dist) 199
201: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 202 202 16 16
200: 24(ptr) AccessChain 117(shadowCoord) 17
203: 8(float) Load 200
205: 145(bool) FOrdGreaterThan 203 204
206: 8(float) Load 156(dist)
207: 24(ptr) AccessChain 117(shadowCoord) 27
208: 8(float) Load 207
209: 145(bool) FOrdLessThan 206 208
210: 145(bool) LogicalAnd 205 209
SelectionMerge 212 None
BranchConditional 210 211 212
211: Label
215: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 213
216: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 217 217 16 16
Store 110(shadow) 214
Branch 212
212: Label
Branch 154
154: Label
219: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 109
220: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 221 221 16 16
218: 8(float) Load 110(shadow)
ReturnValue 218
FunctionEnd
62(filterPCF(vf4;f1;): 8(float) Function None 58
60(sc): 21(ptr) FunctionParameter
61(layer): 24(ptr) FunctionParameter
63: Label
235(texDim): 233(ptr) Variable Function
244(elements): 242(ptr) Variable Function
248(levels): 242(ptr) Variable Function
256(sizeQueryTemp): 254(ptr) Variable Function
280(scale): 24(ptr) Variable Function
287(dx): 24(ptr) Variable Function
299(dy): 24(ptr) Variable Function
311(shadowFactor): 24(ptr) Variable Function
317(count): 242(ptr) Variable Function
324(range): 242(ptr) Variable Function
334(x): 242(ptr) Variable Function
358(y): 242(ptr) Variable Function
391(param): 21(ptr) Variable Function
393(param): 24(ptr) Variable Function
395(param): 29(ptr) Variable Function
70: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 65
71: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 66 66 16 16
69: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 67 60(sc) 49
73: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 72 61(layer) 49
226: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 65 62(filterPCF(vf4;f1;)
240: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 227
241: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 238 238 16 16
239: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 236 235(texDim) 49
247: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 245 244(elements) 49
251: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 249 248(levels) 49
261: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 259 259 16 16
260: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 257 256(sizeQueryTemp) 49
262: 163 Load 170(textureShadowMap)
263: 252(ivec3) ImageQuerySizeLod 262 16
Store 256(sizeQueryTemp) 263
266: 264(ptr) AccessChain 256(sizeQueryTemp) 16
267: 11(int) Load 266
268: 228(int) Bitcast 267
269: 242(ptr) AccessChain 235(texDim) 16
Store 269 268
270: 264(ptr) AccessChain 256(sizeQueryTemp) 44
271: 11(int) Load 270
272: 228(int) Bitcast 271
273: 242(ptr) AccessChain 235(texDim) 44
Store 273 272
274: 264(ptr) AccessChain 256(sizeQueryTemp) 27
275: 11(int) Load 274
276: 228(int) Bitcast 275
Store 244(elements) 276
277: 163 Load 170(textureShadowMap)
278: 11(int) ImageQueryLevels 277
279: 228(int) Bitcast 278
Store 248(levels) 279
285: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 283 283 16 16
284: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 281 280(scale) 49
Store 280(scale) 286
292: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 290 290 16 16
291: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 288 287(dx) 49
293: 8(float) Load 280(scale)
294: 8(float) FMul 293 116
295: 242(ptr) AccessChain 235(texDim) 16
296: 228(int) Load 295
297: 8(float) ConvertSToF 296
298: 8(float) FDiv 294 297
Store 287(dx) 298
304: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 302 302 16 16
303: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 300 299(dy) 49
305: 8(float) Load 280(scale)
306: 8(float) FMul 305 116
307: 242(ptr) AccessChain 235(texDim) 44
308: 228(int) Load 307
309: 8(float) ConvertSToF 308
310: 8(float) FDiv 306 309
Store 299(dy) 310
316: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 314 314 16 16
315: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 312 311(shadowFactor) 49
Store 311(shadowFactor) 204
322: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 320 320 16 16
321: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 318 317(count) 49
Store 317(count) 323
329: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 327 327 16 16
328: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 325 324(range) 49
Store 324(range) 330
338: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 331
339: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 332 332 16 16
337: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 335 334(x) 49
340: 228(int) Load 324(range)
341: 228(int) SNegate 340
Store 334(x) 341
Branch 342
342: Label
346: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 331
347: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 332 332 16 16
LoopMerge 344 345 None
Branch 348
348: Label
350: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 331
351: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 332 332 16 16
349: 228(int) Load 334(x)
352: 228(int) Load 324(range)
353: 145(bool) SLessThanEqual 349 352
BranchConditional 353 343 344
343: Label
362: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 355
363: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 356 356 16 16
361: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 359 358(y) 49
364: 228(int) Load 324(range)
365: 228(int) SNegate 364
Store 358(y) 365
Branch 366
366: Label
370: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 355
371: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 356 356 16 16
LoopMerge 368 369 None
Branch 372
372: Label
374: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 355
375: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 356 356 16 16
373: 228(int) Load 358(y)
376: 228(int) Load 324(range)
377: 145(bool) SLessThanEqual 373 376
BranchConditional 377 367 368
367: Label
380: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 378
381: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 382 382 16 16
379: 8(float) Load 287(dx)
383: 228(int) Load 334(x)
384: 8(float) ConvertSToF 383
385: 8(float) FMul 379 384
386: 8(float) Load 299(dy)
387: 228(int) Load 358(y)
388: 8(float) ConvertSToF 387
389: 8(float) FMul 386 388
390: 26(fvec2) CompositeConstruct 385 389
392: 18(fvec4) Load 60(sc)
Store 391(param) 392
394: 8(float) Load 61(layer)
Store 393(param) 394
Store 395(param) 390
396: 8(float) FunctionCall 36(textureProj(vf4;f1;vf2;) 391(param) 393(param) 395(param)
397: 8(float) Load 311(shadowFactor)
398: 8(float) FAdd 397 396
Store 311(shadowFactor) 398
400: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 401 401 16 16
399: 228(int) Load 317(count)
402: 228(int) IAdd 399 330
Store 317(count) 402
Branch 369
369: Label
404: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 355
405: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 356 356 16 16
403: 228(int) Load 358(y)
406: 228(int) IAdd 403 330
Store 358(y) 406
Branch 366
368: Label
Branch 345
345: Label
408: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 331
409: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 332 332 16 16
407: 228(int) Load 334(x)
410: 228(int) IAdd 407 330
Store 334(x) 410
Branch 342
344: Label
412: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 227
413: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 414 414 16 16
411: 8(float) Load 311(shadowFactor)
415: 228(int) Load 317(count)
416: 8(float) ConvertSToF 415
417: 8(float) FDiv 411 416
ReturnValue 417
FunctionEnd
82(shadow(vf3;vf3;): 74(fvec3) Function None 78
80(fragcolor): 76(ptr) FunctionParameter
81(fragPos): 76(ptr) FunctionParameter
83: Label
426(i): 242(ptr) Variable Function
445(shadowClip): 21(ptr) Variable Function
504(shadowFactor): 24(ptr) Variable Function
513(param): 21(ptr) Variable Function
515(param): 24(ptr) Variable Function
90: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 85
91: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 86 86 16 16
89: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 87 80(fragcolor) 49
94: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 92 81(fragPos) 49
422: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 85 82(shadow(vf3;vf3;)
430: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 424
431: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 425 425 16 16
429: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 427 426(i) 49
Store 426(i) 323
Branch 432
432: Label
436: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 424
437: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 425 425 16 16
LoopMerge 434 435 None
Branch 438
438: Label
440: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 424
441: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 425 425 16 16
439: 228(int) Load 426(i)
443: 145(bool) SLessThan 439 442
BranchConditional 443 433 434
433: Label
450: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 444
451: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 448 448 16 16
449: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 446 445(shadowClip) 49
452: 74(fvec3) Load 81(fragPos)
453: 8(float) CompositeExtract 452 0
454: 8(float) CompositeExtract 452 1
455: 8(float) CompositeExtract 452 2
456: 18(fvec4) CompositeConstruct 453 454 455 116
498: 228(int) Load 426(i)
501: 499(ptr) AccessChain 495 323 330 498 442
502: 457 Load 501
503: 18(fvec4) VectorTimesMatrix 456 502
Store 445(shadowClip) 503
508: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 506 506 16 16
507: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 505 504(shadowFactor) 49
510: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 511 511 16 16
509: 228(int) Load 426(i)
512: 8(float) ConvertSToF 509
514: 18(fvec4) Load 445(shadowClip)
Store 513(param) 514
Store 515(param) 512
516: 8(float) FunctionCall 62(filterPCF(vf4;f1;) 513(param) 515(param)
Store 504(shadowFactor) 516
518: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 519 519 16 16
517: 8(float) Load 504(shadowFactor)
520: 74(fvec3) Load 80(fragcolor)
521: 74(fvec3) VectorTimesScalar 520 517
Store 80(fragcolor) 521
Branch 435
435: Label
523: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 424
524: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 425 425 16 16
522: 228(int) Load 426(i)
525: 228(int) IAdd 522 330
Store 426(i) 525
Branch 432
434: Label
527: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 423
528: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 529 529 16 16
526: 74(fvec3) Load 80(fragcolor)
ReturnValue 526
FunctionEnd
98(@main(vf2;): 18(fvec4) Function None 95
97(inUV): 29(ptr) FunctionParameter
99: Label
536(fragPos): 76(ptr) Variable Function
561(normal): 76(ptr) Variable Function
580(albedo): 21(ptr) Variable Function
598(fragcolor): 76(ptr) Variable Function
625(param): 76(ptr) Variable Function
629(param): 76(ptr) Variable Function
682(N): 76(ptr) Variable Function
693(i): 242(ptr) Variable Function
710(L): 76(ptr) Variable Function
725(dist): 24(ptr) Variable Function
736(V): 76(ptr) Variable Function
751(lightCosInnerAngle): 24(ptr) Variable Function
758(lightCosOuterAngle): 24(ptr) Variable Function
765(lightRange): 24(ptr) Variable Function
772(dir): 76(ptr) Variable Function
788(cosDir): 24(ptr) Variable Function
797(spotEffect): 24(ptr) Variable Function
807(heightAttenuation): 24(ptr) Variable Function
816(NdotL): 24(ptr) Variable Function
826(diff): 76(ptr) Variable Function
834(R): 76(ptr) Variable Function
844(NdotR): 24(ptr) Variable Function
854(spec): 76(ptr) Variable Function
902(param): 76(ptr) Variable Function
907(param): 76(ptr) Variable Function
106: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 101
107: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 102 102 16 16
105: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 103 97(inUV) 49
534: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 101 98(@main(vf2;)
540: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 535
541: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 538 538 16 16
539: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 537 536(fragPos) 49
549: 542 Load 546(textureposition)
554: 175 Load 551(samplerposition)
557: 555 SampledImage 549 554
558: 26(fvec2) Load 97(inUV)
559: 18(fvec4) ImageSampleImplicitLod 557 558
560: 74(fvec3) VectorShuffle 559 559 0 1 2
Store 536(fragPos) 560
566: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 564 564 16 16
565: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 562 561(normal) 49
570: 542 Load 567(textureNormal)
575: 175 Load 572(samplerNormal)
576: 555 SampledImage 570 575
577: 26(fvec2) Load 97(inUV)
578: 18(fvec4) ImageSampleImplicitLod 576 577
579: 74(fvec3) VectorShuffle 578 578 0 1 2
Store 561(normal) 579
585: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 583 583 16 16
584: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 581 580(albedo) 49
589: 542 Load 586(textureAlbedo)
594: 175 Load 591(samplerAlbedo)
595: 555 SampledImage 589 594
596: 26(fvec2) Load 97(inUV)
597: 18(fvec4) ImageSampleImplicitLod 595 596
Store 580(albedo) 597
602: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 600 600 16 16
601: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 599 598(fragcolor) 49
606: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 607 607 16 16
605: 603(ptr) AccessChain 495 323 442
608: 228(int) Load 605
609: 145(bool) SGreaterThan 608 323
SelectionMerge 611 None
BranchConditional 609 610 611
610: Label
614: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 612
615: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 616 616 16 16
613: 603(ptr) AccessChain 495 323 442
617: 228(int) Load 613
SelectionMerge 623 None
Switch 617 623
case 1: 618
case 2: 619
case 3: 620
case 4: 621
case 5: 622
618: Label
626: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 612
627: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 628 628 16 16
Store 625(param) 624
630: 74(fvec3) Load 536(fragPos)
Store 629(param) 630
631: 74(fvec3) FunctionCall 82(shadow(vf3;vf3;) 625(param) 629(param)
Store 598(fragcolor) 631
632: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 633 633 16 16
Branch 623
619: Label
636: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 612
637: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 638 638 16 16
635: 74(fvec3) Load 536(fragPos)
Store 598(fragcolor) 635
639: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 640 640 16 16
Branch 623
620: Label
643: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 612
644: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 645 645 16 16
642: 74(fvec3) Load 561(normal)
Store 598(fragcolor) 642
646: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 647 647 16 16
Branch 623
621: Label
650: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 612
651: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 652 652 16 16
649: 18(fvec4) Load 580(albedo)
653: 74(fvec3) VectorShuffle 649 649 0 1 2
Store 598(fragcolor) 653
654: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 655 655 16 16
Branch 623
622: Label
658: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 612
659: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 660 660 16 16
657: 18(fvec4) Load 580(albedo)
661: 74(fvec3) VectorShuffle 657 657 3 3 3
Store 598(fragcolor) 661
662: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 663 663 16 16
Branch 623
623: Label
667: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 612
668: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 669 669 16 16
666: 74(fvec3) Load 598(fragcolor)
670: 8(float) CompositeExtract 666 0
671: 8(float) CompositeExtract 666 1
672: 8(float) CompositeExtract 666 2
673: 18(fvec4) CompositeConstruct 670 671 672 116
ReturnValue 673
611: Label
676: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 535
677: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 678 678 16 16
675: 18(fvec4) Load 580(albedo)
679: 74(fvec3) VectorShuffle 675 675 0 1 2
681: 74(fvec3) VectorTimesScalar 679 680
Store 598(fragcolor) 681
687: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 685 685 16 16
686: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 683 682(N) 49
688: 74(fvec3) Load 561(normal)
689: 74(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 688
Store 682(N) 689
696: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 690
697: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 691 691 16 16
695: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 694 693(i) 49
Store 693(i) 323
Branch 698
698: Label
702: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 690
703: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 691 691 16 16
LoopMerge 700 701 None
Branch 704
704: Label
706: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 690
707: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 691 691 16 16
705: 228(int) Load 693(i)
708: 145(bool) SLessThan 705 442
BranchConditional 708 699 700
699: Label
715: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 709
716: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 713 713 16 16
714: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 711 710(L) 49
717: 228(int) Load 693(i)
720: 718(ptr) AccessChain 495 323 330 717 323
721: 18(fvec4) Load 720
722: 74(fvec3) VectorShuffle 721 721 0 1 2
723: 74(fvec3) Load 536(fragPos)
724: 74(fvec3) FSub 722 723
Store 710(L) 724
729: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 727 727 16 16
728: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 726 725(dist) 49
730: 74(fvec3) Load 710(L)
731: 8(float) ExtInst 3(GLSL.std.450) 66(Length) 730
Store 725(dist) 731
733: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 734 734 16 16
732: 74(fvec3) Load 710(L)
735: 74(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 732
Store 710(L) 735
741: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 739 739 16 16
740: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 737 736(V) 49
742: 718(ptr) AccessChain 495 323 323
743: 18(fvec4) Load 742
744: 74(fvec3) VectorShuffle 743 743 0 1 2
745: 74(fvec3) Load 536(fragPos)
746: 74(fvec3) FSub 744 745
Store 736(V) 746
748: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 749 749 16 16
747: 74(fvec3) Load 736(V)
750: 74(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 747
Store 736(V) 750
756: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 754 754 16 16
755: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 752 751(lightCosInnerAngle) 49
Store 751(lightCosInnerAngle) 757
763: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 761 761 16 16
762: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 759 758(lightCosOuterAngle) 49
Store 758(lightCosOuterAngle) 764
770: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 768 768 16 16
769: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 766 765(lightRange) 49
Store 765(lightRange) 771
777: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 775 775 16 16
776: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 773 772(dir) 49
778: 228(int) Load 693(i)
779: 718(ptr) AccessChain 495 323 330 778 323
780: 18(fvec4) Load 779
781: 74(fvec3) VectorShuffle 780 780 0 1 2
782: 228(int) Load 693(i)
783: 718(ptr) AccessChain 495 323 330 782 330
784: 18(fvec4) Load 783
785: 74(fvec3) VectorShuffle 784 784 0 1 2
786: 74(fvec3) FSub 781 785
787: 74(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 786
Store 772(dir) 787
793: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 791 791 16 16
792: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 789 788(cosDir) 49
794: 74(fvec3) Load 710(L)
795: 74(fvec3) Load 772(dir)
796: 8(float) Dot 794 795
Store 788(cosDir) 796
802: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 800 800 16 16
801: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 798 797(spotEffect) 49
803: 8(float) Load 758(lightCosOuterAngle)
804: 8(float) Load 751(lightCosInnerAngle)
805: 8(float) Load 788(cosDir)
806: 8(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 803 804 805
Store 797(spotEffect) 806
812: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 810 810 16 16
811: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 808 807(heightAttenuation) 49
813: 8(float) Load 765(lightRange)
814: 8(float) Load 725(dist)
815: 8(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 813 204 814
Store 807(heightAttenuation) 815
821: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 819 819 16 16
820: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 817 816(NdotL) 49
822: 74(fvec3) Load 682(N)
823: 74(fvec3) Load 710(L)
824: 8(float) Dot 822 823
825: 8(float) ExtInst 3(GLSL.std.450) 40(FMax) 204 824
Store 816(NdotL) 825
831: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 829 829 16 16
830: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 827 826(diff) 49
832: 8(float) Load 816(NdotL)
833: 74(fvec3) CompositeConstruct 832 832 832
Store 826(diff) 833
839: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 837 837 16 16
838: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 835 834(R) 49
840: 74(fvec3) Load 710(L)
841: 74(fvec3) FNegate 840
842: 74(fvec3) Load 682(N)
843: 74(fvec3) ExtInst 3(GLSL.std.450) 71(Reflect) 841 842
Store 834(R) 843
849: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 847 847 16 16
848: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 845 844(NdotR) 49
850: 74(fvec3) Load 834(R)
851: 74(fvec3) Load 736(V)
852: 8(float) Dot 850 851
853: 8(float) ExtInst 3(GLSL.std.450) 40(FMax) 204 852
Store 844(NdotR) 853
859: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 857 857 16 16
858: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 855 854(spec) 49
860: 8(float) Load 844(NdotR)
862: 8(float) ExtInst 3(GLSL.std.450) 26(Pow) 860 861
863: 24(ptr) AccessChain 580(albedo) 17
864: 8(float) Load 863
865: 8(float) FMul 862 864
867: 8(float) FMul 865 866
868: 74(fvec3) CompositeConstruct 867 867 867
Store 854(spec) 868
870: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 871 871 16 16
869: 74(fvec3) Load 826(diff)
872: 74(fvec3) Load 854(spec)
873: 74(fvec3) FAdd 869 872
874: 8(float) Load 797(spotEffect)
875: 74(fvec3) VectorTimesScalar 873 874
876: 8(float) Load 807(heightAttenuation)
877: 74(fvec3) VectorTimesScalar 875 876
878: 228(int) Load 693(i)
880: 718(ptr) AccessChain 495 323 330 878 879
881: 18(fvec4) Load 880
882: 74(fvec3) VectorShuffle 881 881 0 1 2
883: 74(fvec3) FMul 877 882
884: 18(fvec4) Load 580(albedo)
885: 74(fvec3) VectorShuffle 884 884 0 1 2
886: 74(fvec3) FMul 883 885
887: 74(fvec3) Load 598(fragcolor)
888: 74(fvec3) FAdd 887 886
Store 598(fragcolor) 888
Branch 701
701: Label
890: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 690
891: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 691 691 16 16
889: 228(int) Load 693(i)
892: 228(int) IAdd 889 330
Store 693(i) 892
Branch 698
700: Label
894: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 535
895: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 896 896 16 16
893: 603(ptr) AccessChain 495 323 879
897: 228(int) Load 893
898: 145(bool) SGreaterThan 897 323
SelectionMerge 900 None
BranchConditional 898 899 900
899: Label
904: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 901
905: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 906 906 16 16
903: 74(fvec3) Load 598(fragcolor)
Store 902(param) 903
908: 74(fvec3) Load 536(fragPos)
Store 907(param) 908
909: 74(fvec3) FunctionCall 82(shadow(vf3;vf3;) 902(param) 907(param)
Store 598(fragcolor) 909
Branch 900
900: Label
911: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 535
912: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 40 913 913 16 16
910: 74(fvec3) Load 598(fragcolor)
914: 8(float) CompositeExtract 910 0
915: 8(float) CompositeExtract 910 1
916: 8(float) CompositeExtract 910 2
917: 18(fvec4) CompositeConstruct 914 915 916 116
ReturnValue 917
FunctionEnd