1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
|
hlsl.w-recip2.frag
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:13 Function Definition: @main(struct-VSOutput-vf4-vf3-vf3-vf21; ( temp 4-component vector of float)
0:13 Function Parameters:
0:13 'VSOut' ( in structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:? Sequence
0:14 Test condition and select ( temp void)
0:14 Condition
0:14 Compare Less Than ( temp bool)
0:14 direct index ( temp float)
0:14 PositionPS: direct index for structure ( temp 4-component vector of float)
0:14 'VSOut' ( in structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14 400.000000
0:14 true case
0:15 Branch: Return with expression
0:15 AmbientColor: direct index for structure ( uniform 4-component vector of float)
0:15 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor, uniform 4-component vector of float AmbientColor2})
0:15 Constant:
0:15 0 (const uint)
0:14 false case
0:17 Branch: Return with expression
0:17 AmbientColor2: direct index for structure ( uniform 4-component vector of float)
0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor, uniform 4-component vector of float AmbientColor2})
0:17 Constant:
0:17 1 (const uint)
0:13 Function Definition: main( ( temp void)
0:13 Function Parameters:
0:? Sequence
0:13 Sequence
0:13 Sequence
0:13 move second child to first child ( temp 4-component vector of float)
0:13 '@fragcoord' ( temp 4-component vector of float)
0:? 'VSOut.PositionPS' ( in 4-component vector of float FragCoord)
0:13 move second child to first child ( temp float)
0:13 direct index ( in float FragCoord)
0:13 '@fragcoord' ( temp 4-component vector of float)
0:13 Constant:
0:13 3 (const int)
0:13 divide ( temp float)
0:13 Constant:
0:13 1.000000
0:13 direct index ( in float FragCoord)
0:13 '@fragcoord' ( temp 4-component vector of float)
0:13 Constant:
0:13 3 (const int)
0:13 move second child to first child ( temp 4-component vector of float)
0:13 PositionPS: direct index for structure ( temp 4-component vector of float)
0:? 'VSOut' ( temp structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:13 Constant:
0:13 0 (const int)
0:13 '@fragcoord' ( temp 4-component vector of float)
0:13 move second child to first child ( temp 3-component vector of float)
0:13 PosInLightViewSpace: direct index for structure ( temp 3-component vector of float)
0:? 'VSOut' ( temp structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:13 Constant:
0:13 1 (const int)
0:? 'VSOut.PosInLightViewSpace' (layout( location=0) in 3-component vector of float)
0:13 move second child to first child ( temp 3-component vector of float)
0:13 NormalWS: direct index for structure ( temp 3-component vector of float)
0:? 'VSOut' ( temp structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:13 Constant:
0:13 2 (const int)
0:? 'VSOut.NormalWS' (layout( location=1) in 3-component vector of float)
0:13 move second child to first child ( temp 2-component vector of float)
0:13 TexCoord: direct index for structure ( temp 2-component vector of float)
0:? 'VSOut' ( temp structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:13 Constant:
0:13 3 (const int)
0:? 'VSOut.TexCoord' (layout( location=2) in 2-component vector of float)
0:13 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:13 Function Call: @main(struct-VSOutput-vf4-vf3-vf3-vf21; ( temp 4-component vector of float)
0:? 'VSOut' ( temp structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor, uniform 4-component vector of float AmbientColor2})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'VSOut.PositionPS' ( in 4-component vector of float FragCoord)
0:? 'VSOut.PosInLightViewSpace' (layout( location=0) in 3-component vector of float)
0:? 'VSOut.NormalWS' (layout( location=1) in 3-component vector of float)
0:? 'VSOut.TexCoord' (layout( location=2) in 2-component vector of float)
Linked fragment stage:
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
0:13 Function Definition: @main(struct-VSOutput-vf4-vf3-vf3-vf21; ( temp 4-component vector of float)
0:13 Function Parameters:
0:13 'VSOut' ( in structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:? Sequence
0:14 Test condition and select ( temp void)
0:14 Condition
0:14 Compare Less Than ( temp bool)
0:14 direct index ( temp float)
0:14 PositionPS: direct index for structure ( temp 4-component vector of float)
0:14 'VSOut' ( in structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14 400.000000
0:14 true case
0:15 Branch: Return with expression
0:15 AmbientColor: direct index for structure ( uniform 4-component vector of float)
0:15 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor, uniform 4-component vector of float AmbientColor2})
0:15 Constant:
0:15 0 (const uint)
0:14 false case
0:17 Branch: Return with expression
0:17 AmbientColor2: direct index for structure ( uniform 4-component vector of float)
0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor, uniform 4-component vector of float AmbientColor2})
0:17 Constant:
0:17 1 (const uint)
0:13 Function Definition: main( ( temp void)
0:13 Function Parameters:
0:? Sequence
0:13 Sequence
0:13 Sequence
0:13 move second child to first child ( temp 4-component vector of float)
0:13 '@fragcoord' ( temp 4-component vector of float)
0:? 'VSOut.PositionPS' ( in 4-component vector of float FragCoord)
0:13 move second child to first child ( temp float)
0:13 direct index ( in float FragCoord)
0:13 '@fragcoord' ( temp 4-component vector of float)
0:13 Constant:
0:13 3 (const int)
0:13 divide ( temp float)
0:13 Constant:
0:13 1.000000
0:13 direct index ( in float FragCoord)
0:13 '@fragcoord' ( temp 4-component vector of float)
0:13 Constant:
0:13 3 (const int)
0:13 move second child to first child ( temp 4-component vector of float)
0:13 PositionPS: direct index for structure ( temp 4-component vector of float)
0:? 'VSOut' ( temp structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:13 Constant:
0:13 0 (const int)
0:13 '@fragcoord' ( temp 4-component vector of float)
0:13 move second child to first child ( temp 3-component vector of float)
0:13 PosInLightViewSpace: direct index for structure ( temp 3-component vector of float)
0:? 'VSOut' ( temp structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:13 Constant:
0:13 1 (const int)
0:? 'VSOut.PosInLightViewSpace' (layout( location=0) in 3-component vector of float)
0:13 move second child to first child ( temp 3-component vector of float)
0:13 NormalWS: direct index for structure ( temp 3-component vector of float)
0:? 'VSOut' ( temp structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:13 Constant:
0:13 2 (const int)
0:? 'VSOut.NormalWS' (layout( location=1) in 3-component vector of float)
0:13 move second child to first child ( temp 2-component vector of float)
0:13 TexCoord: direct index for structure ( temp 2-component vector of float)
0:? 'VSOut' ( temp structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:13 Constant:
0:13 3 (const int)
0:? 'VSOut.TexCoord' (layout( location=2) in 2-component vector of float)
0:13 move second child to first child ( temp 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:13 Function Call: @main(struct-VSOutput-vf4-vf3-vf3-vf21; ( temp 4-component vector of float)
0:? 'VSOut' ( temp structure{ temp 4-component vector of float PositionPS, temp 3-component vector of float PosInLightViewSpace, temp 3-component vector of float NormalWS, temp 2-component vector of float TexCoord})
0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor, uniform 4-component vector of float AmbientColor2})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'VSOut.PositionPS' ( in 4-component vector of float FragCoord)
0:? 'VSOut.PosInLightViewSpace' (layout( location=0) in 3-component vector of float)
0:? 'VSOut.NormalWS' (layout( location=1) in 3-component vector of float)
0:? 'VSOut.TexCoord' (layout( location=2) in 2-component vector of float)
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 75
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 44 56 61 66 71
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Name 4 "main"
Name 10 "VSOutput"
MemberName 10(VSOutput) 0 "PositionPS"
MemberName 10(VSOutput) 1 "PosInLightViewSpace"
MemberName 10(VSOutput) 2 "NormalWS"
MemberName 10(VSOutput) 3 "TexCoord"
Name 14 "@main(struct-VSOutput-vf4-vf3-vf3-vf21;"
Name 13 "VSOut"
Name 28 "$Global"
MemberName 28($Global) 0 "AmbientColor"
MemberName 28($Global) 1 "AmbientColor2"
Name 30 ""
Name 42 "@fragcoord"
Name 44 "VSOut.PositionPS"
Name 52 "VSOut"
Name 56 "VSOut.PosInLightViewSpace"
Name 61 "VSOut.NormalWS"
Name 66 "VSOut.TexCoord"
Name 71 "@entryPointOutput"
Name 72 "param"
MemberDecorate 28($Global) 0 Offset 0
MemberDecorate 28($Global) 1 Offset 16
Decorate 28($Global) Block
Decorate 30 DescriptorSet 0
Decorate 30 Binding 0
Decorate 44(VSOut.PositionPS) BuiltIn FragCoord
Decorate 56(VSOut.PosInLightViewSpace) Location 0
Decorate 61(VSOut.NormalWS) Location 1
Decorate 66(VSOut.TexCoord) Location 2
Decorate 71(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypeVector 6(float) 3
9: TypeVector 6(float) 2
10(VSOutput): TypeStruct 7(fvec4) 8(fvec3) 8(fvec3) 9(fvec2)
11: TypePointer Function 10(VSOutput)
12: TypeFunction 7(fvec4) 11(ptr)
16: TypeInt 32 1
17: 16(int) Constant 0
18: TypeInt 32 0
19: 18(int) Constant 0
20: TypePointer Function 6(float)
23: 6(float) Constant 1137180672
24: TypeBool
28($Global): TypeStruct 7(fvec4) 7(fvec4)
29: TypePointer Uniform 28($Global)
30: 29(ptr) Variable Uniform
31: TypePointer Uniform 7(fvec4)
36: 16(int) Constant 1
41: TypePointer Function 7(fvec4)
43: TypePointer Input 7(fvec4)
44(VSOut.PositionPS): 43(ptr) Variable Input
46: 6(float) Constant 1065353216
47: 18(int) Constant 3
55: TypePointer Input 8(fvec3)
56(VSOut.PosInLightViewSpace): 55(ptr) Variable Input
58: TypePointer Function 8(fvec3)
60: 16(int) Constant 2
61(VSOut.NormalWS): 55(ptr) Variable Input
64: 16(int) Constant 3
65: TypePointer Input 9(fvec2)
66(VSOut.TexCoord): 65(ptr) Variable Input
68: TypePointer Function 9(fvec2)
70: TypePointer Output 7(fvec4)
71(@entryPointOutput): 70(ptr) Variable Output
4(main): 2 Function None 3
5: Label
42(@fragcoord): 41(ptr) Variable Function
52(VSOut): 11(ptr) Variable Function
72(param): 11(ptr) Variable Function
45: 7(fvec4) Load 44(VSOut.PositionPS)
Store 42(@fragcoord) 45
48: 20(ptr) AccessChain 42(@fragcoord) 47
49: 6(float) Load 48
50: 6(float) FDiv 46 49
51: 20(ptr) AccessChain 42(@fragcoord) 47
Store 51 50
53: 7(fvec4) Load 42(@fragcoord)
54: 41(ptr) AccessChain 52(VSOut) 17
Store 54 53
57: 8(fvec3) Load 56(VSOut.PosInLightViewSpace)
59: 58(ptr) AccessChain 52(VSOut) 36
Store 59 57
62: 8(fvec3) Load 61(VSOut.NormalWS)
63: 58(ptr) AccessChain 52(VSOut) 60
Store 63 62
67: 9(fvec2) Load 66(VSOut.TexCoord)
69: 68(ptr) AccessChain 52(VSOut) 64
Store 69 67
73:10(VSOutput) Load 52(VSOut)
Store 72(param) 73
74: 7(fvec4) FunctionCall 14(@main(struct-VSOutput-vf4-vf3-vf3-vf21;) 72(param)
Store 71(@entryPointOutput) 74
Return
FunctionEnd
14(@main(struct-VSOutput-vf4-vf3-vf3-vf21;): 7(fvec4) Function None 12
13(VSOut): 11(ptr) FunctionParameter
15: Label
21: 20(ptr) AccessChain 13(VSOut) 17 19
22: 6(float) Load 21
25: 24(bool) FOrdLessThan 22 23
SelectionMerge 27 None
BranchConditional 25 26 35
26: Label
32: 31(ptr) AccessChain 30 17
33: 7(fvec4) Load 32
ReturnValue 33
35: Label
37: 31(ptr) AccessChain 30 36
38: 7(fvec4) Load 37
ReturnValue 38
27: Label
Unreachable
FunctionEnd
|