SPV legacy texturing: Smear result of Op*Dref* up to a vector to match

the expectations of old GLSL shadow*() lookups.
This commit is contained in:
John Kessenich 2015-09-14 22:08:12 -06:00
parent e770b3e6cf
commit 7355eebb18
3 changed files with 248 additions and 212 deletions

View File

@ -1214,6 +1214,23 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b
} }
} }
// See if the result type is expecting a smeared result.
// This happens when a legacy shadow*() call is made, which
// gets a vec4 back instead of a float.
Id smearedType = resultType;
if (! isScalarType(resultType)) {
switch (opCode) {
case OpImageSampleDrefImplicitLod:
case OpImageSampleDrefExplicitLod:
case OpImageSampleProjDrefImplicitLod:
case OpImageSampleProjDrefExplicitLod:
resultType = getScalarTypeId(resultType);
break;
default:
break;
}
}
Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode); Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode);
for (int op = 0; op < optArgNum; ++op) for (int op = 0; op < optArgNum; ++op)
textureInst->addIdOperand(texArgs[op]); textureInst->addIdOperand(texArgs[op]);
@ -1224,7 +1241,14 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool fetch, b
setPrecision(textureInst->getResultId(), precision); setPrecision(textureInst->getResultId(), precision);
buildPoint->addInstruction(textureInst); buildPoint->addInstruction(textureInst);
return textureInst->getResultId(); Id resultId = textureInst->getResultId();
// When a smear is needed, do it, as per what was computed
// above when resultType was changed to a scalar type.
if (resultType != smearedType)
resultId = smearScalar(precision, resultId, smearedType);
return resultId;
} }
// Comments in header // Comments in header

View File

@ -8,7 +8,7 @@ Linked fragment stage:
// Module Version 99 // Module Version 99
// Generated by (magic number): 51a00bb // Generated by (magic number): 51a00bb
// Id's are bound by 282 // Id's are bound by 290
Source GLSL 130 Source GLSL 130
Capability Shader Capability Shader
@ -31,21 +31,21 @@ Linked fragment stage:
Name 98 "texSampler3D" Name 98 "texSampler3D"
Name 124 "texSamplerCube" Name 124 "texSamplerCube"
Name 139 "shadowSampler1D" Name 139 "shadowSampler1D"
Name 156 "shadowSampler2D" Name 158 "shadowSampler2D"
Name 199 "iCoords2D" Name 207 "iCoords2D"
Name 204 "iLod" Name 212 "iLod"
Name 213 "gradX" Name 221 "gradX"
Name 216 "gradY" Name 224 "gradY"
Name 268 "gl_FragColor" Name 276 "gl_FragColor"
Name 271 "u" Name 279 "u"
Name 274 "blend" Name 282 "blend"
Name 280 "scale" Name 288 "scale"
Name 281 "t" Name 289 "t"
Decorate 47(coords2D) Smooth Decorate 47(coords2D) Smooth
Decorate 268(gl_FragColor) BuiltIn FragColor Decorate 276(gl_FragColor) BuiltIn FragColor
Decorate 280(scale) NoStaticUse Decorate 288(scale) NoStaticUse
Decorate 281(t) Smooth Decorate 289(t) Smooth
Decorate 281(t) NoStaticUse Decorate 289(t) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -86,31 +86,31 @@ Linked fragment stage:
137: TypeSampledImage 136 137: TypeSampledImage 136
138: TypePointer UniformConstant 137 138: TypePointer UniformConstant 137
139(shadowSampler1D): 138(ptr) Variable UniformConstant 139(shadowSampler1D): 138(ptr) Variable UniformConstant
153: TypeImage 6(float) 2D depth sampled format:Unknown 155: TypeImage 6(float) 2D depth sampled format:Unknown
154: TypeSampledImage 153 156: TypeSampledImage 155
155: TypePointer UniformConstant 154 157: TypePointer UniformConstant 156
156(shadowSampler2D): 155(ptr) Variable UniformConstant 158(shadowSampler2D): 157(ptr) Variable UniformConstant
196: TypeInt 32 1 204: TypeInt 32 1
197: TypeVector 196(int) 2 205: TypeVector 204(int) 2
198: TypePointer Function 197(ivec2) 206: TypePointer Function 205(ivec2)
200: 196(int) Constant 0 208: 204(int) Constant 0
201: 196(int) Constant 5 209: 204(int) Constant 5
202: 197(ivec2) ConstantComposite 200 201 210: 205(ivec2) ConstantComposite 208 209
203: TypePointer Function 196(int) 211: TypePointer Function 204(int)
205: 196(int) Constant 1 213: 204(int) Constant 1
212: TypePointer Function 45(fvec2) 220: TypePointer Function 45(fvec2)
241: 196(int) Constant 3 249: 204(int) Constant 3
242: 196(int) Constant 4294967289 250: 204(int) Constant 4294967289
243: 197(ivec2) ConstantComposite 241 242 251: 205(ivec2) ConstantComposite 249 250
267: TypePointer Output 22(fvec4) 275: TypePointer Output 22(fvec4)
268(gl_FragColor): 267(ptr) Variable Output 276(gl_FragColor): 275(ptr) Variable Output
270: TypePointer UniformConstant 22(fvec4) 278: TypePointer UniformConstant 22(fvec4)
271(u): 270(ptr) Variable UniformConstant 279(u): 278(ptr) Variable UniformConstant
273: TypePointer UniformConstant 6(float) 281: TypePointer UniformConstant 6(float)
274(blend): 273(ptr) Variable UniformConstant 282(blend): 281(ptr) Variable UniformConstant
279: TypePointer UniformConstant 45(fvec2) 287: TypePointer UniformConstant 45(fvec2)
280(scale): 279(ptr) Variable UniformConstant 288(scale): 287(ptr) Variable UniformConstant
281(t): 46(ptr) Variable Input 289(t): 46(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(blendscale): 7(ptr) Variable Function 8(blendscale): 7(ptr) Variable Function
@ -121,10 +121,10 @@ Linked fragment stage:
18(coords3D): 17(ptr) Variable Function 18(coords3D): 17(ptr) Variable Function
24(coords4D): 23(ptr) Variable Function 24(coords4D): 23(ptr) Variable Function
26(color): 23(ptr) Variable Function 26(color): 23(ptr) Variable Function
199(iCoords2D): 198(ptr) Variable Function 207(iCoords2D): 206(ptr) Variable Function
204(iLod): 203(ptr) Variable Function 212(iLod): 211(ptr) Variable Function
213(gradX): 212(ptr) Variable Function 221(gradX): 220(ptr) Variable Function
216(gradY): 212(ptr) Variable Function 224(gradY): 220(ptr) Variable Function
Store 8(blendscale) 9 Store 8(blendscale) 9
Store 10(bias) 11 Store 10(bias) 11
Store 12(lod) 13 Store 12(lod) 13
@ -240,134 +240,142 @@ Linked fragment stage:
140: 137 Load 139(shadowSampler1D) 140: 137 Load 139(shadowSampler1D)
141: 16(fvec3) Load 18(coords3D) 141: 16(fvec3) Load 18(coords3D)
142: 6(float) CompositeExtract 141 2 142: 6(float) CompositeExtract 141 2
143: 22(fvec4) ImageSampleDrefImplicitLod 140 141 142 143: 6(float) ImageSampleDrefImplicitLod 140 141 142
144: 22(fvec4) Load 26(color) 144: 22(fvec4) CompositeConstruct 143 143 143 143
145: 22(fvec4) FAdd 144 143 145: 22(fvec4) Load 26(color)
Store 26(color) 145 146: 22(fvec4) FAdd 145 144
146: 137 Load 139(shadowSampler1D) Store 26(color) 146
147: 16(fvec3) Load 18(coords3D) 147: 137 Load 139(shadowSampler1D)
148: 6(float) Load 10(bias) 148: 16(fvec3) Load 18(coords3D)
149: 6(float) CompositeExtract 147 2 149: 6(float) Load 10(bias)
150: 22(fvec4) ImageSampleDrefImplicitLod 146 147 149 148 150: 6(float) CompositeExtract 148 2
151: 22(fvec4) Load 26(color) 151: 6(float) ImageSampleDrefImplicitLod 147 148 150 149
152: 22(fvec4) FAdd 151 150 152: 22(fvec4) CompositeConstruct 151 151 151 151
Store 26(color) 152 153: 22(fvec4) Load 26(color)
157: 154 Load 156(shadowSampler2D) 154: 22(fvec4) FAdd 153 152
158: 16(fvec3) Load 18(coords3D) Store 26(color) 154
159: 6(float) CompositeExtract 158 2 159: 156 Load 158(shadowSampler2D)
160: 22(fvec4) ImageSampleDrefImplicitLod 157 158 159 160: 16(fvec3) Load 18(coords3D)
161: 22(fvec4) Load 26(color) 161: 6(float) CompositeExtract 160 2
162: 22(fvec4) FAdd 161 160 162: 6(float) ImageSampleDrefImplicitLod 159 160 161
Store 26(color) 162 163: 22(fvec4) CompositeConstruct 162 162 162 162
163: 154 Load 156(shadowSampler2D) 164: 22(fvec4) Load 26(color)
164: 16(fvec3) Load 18(coords3D) 165: 22(fvec4) FAdd 164 163
165: 6(float) Load 10(bias) Store 26(color) 165
166: 6(float) CompositeExtract 164 2 166: 156 Load 158(shadowSampler2D)
167: 22(fvec4) ImageSampleDrefImplicitLod 163 164 166 165 167: 16(fvec3) Load 18(coords3D)
168: 22(fvec4) Load 26(color) 168: 6(float) Load 10(bias)
169: 22(fvec4) FAdd 168 167 169: 6(float) CompositeExtract 167 2
Store 26(color) 169 170: 6(float) ImageSampleDrefImplicitLod 166 167 169 168
170: 137 Load 139(shadowSampler1D) 171: 22(fvec4) CompositeConstruct 170 170 170 170
171: 22(fvec4) Load 24(coords4D) 172: 22(fvec4) Load 26(color)
172: 6(float) CompositeExtract 171 3 173: 22(fvec4) FAdd 172 171
173: 22(fvec4) ImageSampleProjDrefImplicitLod 170 171 172 Store 26(color) 173
174: 22(fvec4) Load 26(color) 174: 137 Load 139(shadowSampler1D)
175: 22(fvec4) FAdd 174 173 175: 22(fvec4) Load 24(coords4D)
Store 26(color) 175 176: 6(float) CompositeExtract 175 3
176: 137 Load 139(shadowSampler1D) 177: 6(float) ImageSampleProjDrefImplicitLod 174 175 176
177: 22(fvec4) Load 24(coords4D) 178: 22(fvec4) CompositeConstruct 177 177 177 177
178: 6(float) Load 10(bias) 179: 22(fvec4) Load 26(color)
179: 6(float) CompositeExtract 177 3 180: 22(fvec4) FAdd 179 178
180: 22(fvec4) ImageSampleProjDrefImplicitLod 176 177 179 178 Store 26(color) 180
181: 22(fvec4) Load 26(color) 181: 137 Load 139(shadowSampler1D)
182: 22(fvec4) FAdd 181 180 182: 22(fvec4) Load 24(coords4D)
Store 26(color) 182 183: 6(float) Load 10(bias)
183: 154 Load 156(shadowSampler2D) 184: 6(float) CompositeExtract 182 3
184: 22(fvec4) Load 24(coords4D) 185: 6(float) ImageSampleProjDrefImplicitLod 181 182 184 183
185: 6(float) CompositeExtract 184 3 186: 22(fvec4) CompositeConstruct 185 185 185 185
186: 22(fvec4) ImageSampleProjDrefImplicitLod 183 184 185
187: 22(fvec4) Load 26(color) 187: 22(fvec4) Load 26(color)
188: 22(fvec4) FAdd 187 186 188: 22(fvec4) FAdd 187 186
Store 26(color) 188 Store 26(color) 188
189: 154 Load 156(shadowSampler2D) 189: 156 Load 158(shadowSampler2D)
190: 22(fvec4) Load 24(coords4D) 190: 22(fvec4) Load 24(coords4D)
191: 6(float) Load 10(bias) 191: 6(float) CompositeExtract 190 3
192: 6(float) CompositeExtract 190 3 192: 6(float) ImageSampleProjDrefImplicitLod 189 190 191
193: 22(fvec4) ImageSampleProjDrefImplicitLod 189 190 192 191 193: 22(fvec4) CompositeConstruct 192 192 192 192
194: 22(fvec4) Load 26(color) 194: 22(fvec4) Load 26(color)
195: 22(fvec4) FAdd 194 193 195: 22(fvec4) FAdd 194 193
Store 26(color) 195 Store 26(color) 195
Store 199(iCoords2D) 202 196: 156 Load 158(shadowSampler2D)
Store 204(iLod) 205 197: 22(fvec4) Load 24(coords4D)
206: 70 Load 72(texSampler2D) 198: 6(float) Load 10(bias)
207: 197(ivec2) Load 199(iCoords2D) 199: 6(float) CompositeExtract 197 3
208: 196(int) Load 204(iLod) 200: 6(float) ImageSampleProjDrefImplicitLod 196 197 199 198
209: 22(fvec4) ImageFetch 206 207 201: 22(fvec4) CompositeConstruct 200 200 200 200
210: 22(fvec4) Load 26(color) 202: 22(fvec4) Load 26(color)
211: 22(fvec4) FAdd 210 209 203: 22(fvec4) FAdd 202 201
Store 26(color) 211 Store 26(color) 203
214: 45(fvec2) Load 47(coords2D) Store 207(iCoords2D) 210
215: 45(fvec2) DPdx 214 Store 212(iLod) 213
Store 213(gradX) 215 214: 70 Load 72(texSampler2D)
217: 45(fvec2) Load 47(coords2D) 215: 205(ivec2) Load 207(iCoords2D)
218: 45(fvec2) DPdy 217 216: 204(int) Load 212(iLod)
Store 216(gradY) 218 217: 22(fvec4) ImageFetch 214 215
219: 70 Load 72(texSampler2D) 218: 22(fvec4) Load 26(color)
220: 45(fvec2) Load 47(coords2D) 219: 22(fvec4) FAdd 218 217
221: 45(fvec2) Load 213(gradX) Store 26(color) 219
222: 45(fvec2) Load 216(gradY) 222: 45(fvec2) Load 47(coords2D)
223: 22(fvec4) ImageSampleExplicitLod 219 220 221 222 223: 45(fvec2) DPdx 222
224: 22(fvec4) Load 26(color) Store 221(gradX) 223
225: 22(fvec4) FAdd 224 223 225: 45(fvec2) Load 47(coords2D)
Store 26(color) 225 226: 45(fvec2) DPdy 225
226: 70 Load 72(texSampler2D) Store 224(gradY) 226
227: 45(fvec2) Load 47(coords2D) 227: 70 Load 72(texSampler2D)
228: 6(float) Load 14(proj) 228: 45(fvec2) Load 47(coords2D)
229: 6(float) CompositeExtract 227 0 229: 45(fvec2) Load 221(gradX)
230: 6(float) CompositeExtract 227 1 230: 45(fvec2) Load 224(gradY)
231: 16(fvec3) CompositeConstruct 229 230 228 231: 22(fvec4) ImageSampleExplicitLod 227 228 229 230
232: 45(fvec2) Load 213(gradX) 232: 22(fvec4) Load 26(color)
233: 45(fvec2) Load 216(gradY) 233: 22(fvec4) FAdd 232 231
234: 22(fvec4) ImageSampleProjExplicitLod 226 231 232 233 Store 26(color) 233
235: 22(fvec4) Load 26(color) 234: 70 Load 72(texSampler2D)
236: 22(fvec4) FAdd 235 234 235: 45(fvec2) Load 47(coords2D)
Store 26(color) 236 236: 6(float) Load 14(proj)
237: 70 Load 72(texSampler2D) 237: 6(float) CompositeExtract 235 0
238: 45(fvec2) Load 47(coords2D) 238: 6(float) CompositeExtract 235 1
239: 45(fvec2) Load 213(gradX) 239: 16(fvec3) CompositeConstruct 237 238 236
240: 45(fvec2) Load 216(gradY) 240: 45(fvec2) Load 221(gradX)
244: 22(fvec4) ImageSampleExplicitLod 237 238 239 240 243 241: 45(fvec2) Load 224(gradY)
245: 22(fvec4) Load 26(color) 242: 22(fvec4) ImageSampleProjExplicitLod 234 239 240 241
246: 22(fvec4) FAdd 245 244 243: 22(fvec4) Load 26(color)
Store 26(color) 246 244: 22(fvec4) FAdd 243 242
247: 70 Load 72(texSampler2D) Store 26(color) 244
248: 16(fvec3) Load 18(coords3D) 245: 70 Load 72(texSampler2D)
249: 45(fvec2) Load 213(gradX) 246: 45(fvec2) Load 47(coords2D)
250: 45(fvec2) Load 216(gradY) 247: 45(fvec2) Load 221(gradX)
251: 22(fvec4) ImageSampleProjExplicitLod 247 248 249 250 243 248: 45(fvec2) Load 224(gradY)
252: 22(fvec4) Load 26(color) 252: 22(fvec4) ImageSampleExplicitLod 245 246 247 248 251
253: 22(fvec4) FAdd 252 251 253: 22(fvec4) Load 26(color)
Store 26(color) 253 254: 22(fvec4) FAdd 253 252
254: 154 Load 156(shadowSampler2D) Store 26(color) 254
255: 45(fvec2) Load 47(coords2D) 255: 70 Load 72(texSampler2D)
256: 6(float) Load 12(lod) 256: 16(fvec3) Load 18(coords3D)
257: 6(float) CompositeExtract 255 0 257: 45(fvec2) Load 221(gradX)
258: 6(float) CompositeExtract 255 1 258: 45(fvec2) Load 224(gradY)
259: 16(fvec3) CompositeConstruct 257 258 256 259: 22(fvec4) ImageSampleProjExplicitLod 255 256 257 258 251
260: 45(fvec2) Load 213(gradX) 260: 22(fvec4) Load 26(color)
261: 45(fvec2) Load 216(gradY) 261: 22(fvec4) FAdd 260 259
262: 6(float) CompositeExtract 259 2 Store 26(color) 261
263: 6(float) ImageSampleDrefExplicitLod 254 259 262 260 261 262: 156 Load 158(shadowSampler2D)
264: 22(fvec4) Load 26(color) 263: 45(fvec2) Load 47(coords2D)
265: 22(fvec4) CompositeConstruct 263 263 263 263 264: 6(float) Load 12(lod)
266: 22(fvec4) FAdd 264 265 265: 6(float) CompositeExtract 263 0
Store 26(color) 266 266: 6(float) CompositeExtract 263 1
269: 22(fvec4) Load 26(color) 267: 16(fvec3) CompositeConstruct 265 266 264
272: 22(fvec4) Load 271(u) 268: 45(fvec2) Load 221(gradX)
275: 6(float) Load 274(blend) 269: 45(fvec2) Load 224(gradY)
276: 6(float) Load 8(blendscale) 270: 6(float) CompositeExtract 267 2
277: 6(float) FMul 275 276 271: 6(float) ImageSampleDrefExplicitLod 262 267 270 268 269
278: 22(fvec4) ExtInst 1(GLSL.std.450) 46(Mix) 269 272 277 272: 22(fvec4) Load 26(color)
Store 268(gl_FragColor) 278 273: 22(fvec4) CompositeConstruct 271 271 271 271
274: 22(fvec4) FAdd 272 273
Store 26(color) 274
277: 22(fvec4) Load 26(color)
280: 22(fvec4) Load 279(u)
283: 6(float) Load 282(blend)
284: 6(float) Load 8(blendscale)
285: 6(float) FMul 283 284
286: 22(fvec4) ExtInst 1(GLSL.std.450) 46(Mix) 277 280 285
Store 276(gl_FragColor) 286
Return Return
FunctionEnd FunctionEnd

View File

@ -5,7 +5,7 @@ Linked vertex stage:
// Module Version 99 // Module Version 99
// Generated by (magic number): 51a00bb // Generated by (magic number): 51a00bb
// Id's are bound by 141 // Id's are bound by 145
Source GLSL 130 Source GLSL 130
Capability Shader Capability Shader
@ -24,12 +24,12 @@ Linked vertex stage:
Name 76 "texSampler3D" Name 76 "texSampler3D"
Name 92 "texSamplerCube" Name 92 "texSamplerCube"
Name 102 "shadowSampler1D" Name 102 "shadowSampler1D"
Name 113 "shadowSampler2D" Name 114 "shadowSampler2D"
Name 136 "gl_Position" Name 140 "gl_Position"
Name 140 "gl_VertexID" Name 144 "gl_VertexID"
Decorate 136(gl_Position) BuiltIn Position Decorate 140(gl_Position) BuiltIn Position
Decorate 140(gl_VertexID) BuiltIn VertexId Decorate 144(gl_VertexID) BuiltIn VertexId
Decorate 140(gl_VertexID) NoStaticUse Decorate 144(gl_VertexID) NoStaticUse
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@ -70,15 +70,15 @@ Linked vertex stage:
100: TypeSampledImage 99 100: TypeSampledImage 99
101: TypePointer UniformConstant 100 101: TypePointer UniformConstant 100
102(shadowSampler1D): 101(ptr) Variable UniformConstant 102(shadowSampler1D): 101(ptr) Variable UniformConstant
110: TypeImage 6(float) 2D depth sampled format:Unknown 111: TypeImage 6(float) 2D depth sampled format:Unknown
111: TypeSampledImage 110 112: TypeSampledImage 111
112: TypePointer UniformConstant 111 113: TypePointer UniformConstant 112
113(shadowSampler2D): 112(ptr) Variable UniformConstant 114(shadowSampler2D): 113(ptr) Variable UniformConstant
135: TypePointer Output 18(fvec4) 139: TypePointer Output 18(fvec4)
136(gl_Position): 135(ptr) Variable Output 140(gl_Position): 139(ptr) Variable Output
138: TypeInt 32 1 142: TypeInt 32 1
139: TypePointer Input 138(int) 143: TypePointer Input 142(int)
140(gl_VertexID): 139(ptr) Variable Input 144(gl_VertexID): 143(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
8(lod): 7(ptr) Variable Function 8(lod): 7(ptr) Variable Function
@ -158,35 +158,39 @@ Linked vertex stage:
104: 12(fvec3) Load 14(coords3D) 104: 12(fvec3) Load 14(coords3D)
105: 6(float) Load 8(lod) 105: 6(float) Load 8(lod)
106: 6(float) CompositeExtract 104 2 106: 6(float) CompositeExtract 104 2
107: 18(fvec4) ImageSampleDrefExplicitLod 103 104 106 105 107: 6(float) ImageSampleDrefExplicitLod 103 104 106 105
108: 18(fvec4) Load 23(color) 108: 18(fvec4) CompositeConstruct 107 107 107 107
109: 18(fvec4) FAdd 108 107 109: 18(fvec4) Load 23(color)
Store 23(color) 109 110: 18(fvec4) FAdd 109 108
114: 111 Load 113(shadowSampler2D) Store 23(color) 110
115: 12(fvec3) Load 14(coords3D) 115: 112 Load 114(shadowSampler2D)
116: 6(float) Load 8(lod) 116: 12(fvec3) Load 14(coords3D)
117: 6(float) CompositeExtract 115 2 117: 6(float) Load 8(lod)
118: 18(fvec4) ImageSampleDrefExplicitLod 114 115 117 116 118: 6(float) CompositeExtract 116 2
119: 18(fvec4) Load 23(color) 119: 6(float) ImageSampleDrefExplicitLod 115 116 118 117
120: 18(fvec4) FAdd 119 118 120: 18(fvec4) CompositeConstruct 119 119 119 119
Store 23(color) 120 121: 18(fvec4) Load 23(color)
121: 100 Load 102(shadowSampler1D) 122: 18(fvec4) FAdd 121 120
122: 18(fvec4) Load 20(coords4D) Store 23(color) 122
123: 6(float) Load 8(lod) 123: 100 Load 102(shadowSampler1D)
124: 6(float) CompositeExtract 122 3 124: 18(fvec4) Load 20(coords4D)
125: 18(fvec4) ImageSampleProjDrefExplicitLod 121 122 124 123 125: 6(float) Load 8(lod)
126: 18(fvec4) Load 23(color) 126: 6(float) CompositeExtract 124 3
127: 18(fvec4) FAdd 126 125 127: 6(float) ImageSampleProjDrefExplicitLod 123 124 126 125
Store 23(color) 127 128: 18(fvec4) CompositeConstruct 127 127 127 127
128: 111 Load 113(shadowSampler2D) 129: 18(fvec4) Load 23(color)
129: 18(fvec4) Load 20(coords4D) 130: 18(fvec4) FAdd 129 128
130: 6(float) Load 8(lod) Store 23(color) 130
131: 6(float) CompositeExtract 129 3 131: 112 Load 114(shadowSampler2D)
132: 18(fvec4) ImageSampleProjDrefExplicitLod 128 129 131 130 132: 18(fvec4) Load 20(coords4D)
133: 18(fvec4) Load 23(color) 133: 6(float) Load 8(lod)
134: 18(fvec4) FAdd 133 132 134: 6(float) CompositeExtract 132 3
Store 23(color) 134 135: 6(float) ImageSampleProjDrefExplicitLod 131 132 134 133
136: 18(fvec4) CompositeConstruct 135 135 135 135
137: 18(fvec4) Load 23(color) 137: 18(fvec4) Load 23(color)
Store 136(gl_Position) 137 138: 18(fvec4) FAdd 137 136
Store 23(color) 138
141: 18(fvec4) Load 23(color)
Store 140(gl_Position) 141
Return Return
FunctionEnd FunctionEnd