forked from cmuratori/refterm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
refterm_ps.h
432 lines (431 loc) · 14.9 KB
/
refterm_ps.h
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
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
#if 0
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[3], immediateIndexed
dcl_resource_structured t0, 12
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
dcl_temps 6
ftou r0.xy, v0.xyxx
iadd r0.zw, r0.xxxy, -cb0[1].xxxy
udiv r1.xy, null, r0.zwzz, cb0[0].xyxx
uge r0.xy, r0.xyxx, cb0[1].xyxx
and r0.x, r0.y, r0.x
ult r1.zw, r1.xxxy, cb0[0].zzzw
and r0.x, r0.x, r1.z
and r0.x, r1.w, r0.x
if_nz r0.x
udiv null, r0.xy, r0.zwzz, cb0[0].xyxx
imad r0.z, r1.y, cb0[0].z, r1.x
ld_structured_indexable(structured_buffer, stride=12)(mixed,mixed,mixed,mixed) r1.xyz, r0.z, l(0), t0.xyzx
and r2.xyz, r1.xzyx, l(0x0000ffff, 255, 255, 0)
ushr r0.zw, r1.xxxy, l(0, 0, 16, 31)
mov r2.w, r0.z
imad r3.xy, r2.xwxx, cb0[0].xyxx, r0.xyxx
mov r3.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r3.xyzw, r3.xyzw, t1.xyzw
ubfe r4.xyzw, l(8, 8, 8, 8), l(8, 16, 8, 16), r1.zzyy
itof r5.x, r2.y
itof r5.yz, r4.xxyx
mul r1.xzw, r5.xxyz, l(0.003922, 0.000000, 0.003922, 0.003922)
itof r2.x, r2.z
itof r2.yz, r4.zzwz
mul r2.xyz, r2.xyzx, l(0.003922, 0.003922, 0.003922, 0.000000)
and r0.x, cb0[1].z, l(255)
ubfe r4.xy, l(8, 8, 0, 0), l(8, 16, 0, 0), cb0[1].zzzz
itof r5.x, r0.x
itof r5.yz, r4.xxyx
mul r4.xyz, r2.xyzx, r5.xyzx
ubfe r5.xyz, l(1, 1, 1, 0), l(28, 25, 27, 0), r1.yyyy
mul r4.xyz, r4.xyzx, l(0.003922, 0.003922, 0.003922, 0.000000)
movc r2.xyz, r5.xxxx, r4.xyzx, r2.xyzx
mul r4.xyz, r2.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
movc r2.xyz, r5.yyyy, r4.xyzx, r2.xyzx
add r0.x, -r3.w, l(1.000000)
mul r3.xyz, r2.xyzx, r3.xyzx
mad r1.xyz, r0.xxxx, r1.xzwx, r3.xyzx
ine r0.x, r5.z, l(0)
uge r3.xy, r0.yyyy, cb0[2].zxzz
and r0.x, r0.x, r3.x
ult r0.yz, r0.yyyy, cb0[2].wwyw
and r0.x, r0.y, r0.x
ine r0.y, r0.w, l(0)
and r0.y, r3.y, r0.y
and r0.y, r0.z, r0.y
or r0.x, r0.y, r0.x
movc r0.xyz, r0.xxxx, r2.xyzx, r1.xyzx
else
and r0.w, cb0[1].w, l(255)
ubfe r1.xy, l(8, 8, 0, 0), l(8, 16, 0, 0), cb0[1].wwww
itof r2.x, r0.w
itof r2.yz, r1.xxyx
mul r0.xyz, r2.xyzx, l(0.003922, 0.003922, 0.003922, 0.000000)
endif
mov o0.xyz, r0.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 0 instruction slots used
#endif
const BYTE ReftermPSShaderBytes[] =
{
68, 88, 66, 67, 128, 220,
99, 152, 112, 30, 119, 113,
9, 107, 241, 182, 138, 85,
27, 5, 1, 0, 0, 0,
0, 8, 0, 0, 3, 0,
0, 0, 44, 0, 0, 0,
96, 0, 0, 0, 148, 0,
0, 0, 73, 83, 71, 78,
44, 0, 0, 0, 1, 0,
0, 0, 8, 0, 0, 0,
32, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
3, 0, 0, 0, 0, 0,
0, 0, 15, 3, 0, 0,
83, 86, 95, 80, 79, 83,
73, 84, 73, 79, 78, 0,
79, 83, 71, 78, 44, 0,
0, 0, 1, 0, 0, 0,
8, 0, 0, 0, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0,
15, 0, 0, 0, 83, 86,
95, 84, 65, 82, 71, 69,
84, 0, 171, 171, 83, 72,
69, 88, 100, 7, 0, 0,
80, 0, 0, 0, 217, 1,
0, 0, 106, 8, 0, 1,
89, 0, 0, 4, 70, 142,
32, 0, 0, 0, 0, 0,
3, 0, 0, 0, 162, 0,
0, 4, 0, 112, 16, 0,
0, 0, 0, 0, 12, 0,
0, 0, 88, 24, 0, 4,
0, 112, 16, 0, 1, 0,
0, 0, 85, 85, 0, 0,
100, 32, 0, 4, 50, 16,
16, 0, 0, 0, 0, 0,
1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0,
0, 0, 0, 0, 104, 0,
0, 2, 6, 0, 0, 0,
28, 0, 0, 5, 50, 0,
16, 0, 0, 0, 0, 0,
70, 16, 16, 0, 0, 0,
0, 0, 30, 0, 0, 9,
194, 0, 16, 0, 0, 0,
0, 0, 6, 4, 16, 0,
0, 0, 0, 0, 6, 132,
32, 128, 65, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 0, 78, 0, 0, 9,
50, 0, 16, 0, 1, 0,
0, 0, 0, 208, 0, 0,
230, 10, 16, 0, 0, 0,
0, 0, 70, 128, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 80, 0, 0, 8,
50, 0, 16, 0, 0, 0,
0, 0, 70, 0, 16, 0,
0, 0, 0, 0, 70, 128,
32, 0, 0, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 7, 18, 0, 16, 0,
0, 0, 0, 0, 26, 0,
16, 0, 0, 0, 0, 0,
10, 0, 16, 0, 0, 0,
0, 0, 79, 0, 0, 8,
194, 0, 16, 0, 1, 0,
0, 0, 6, 4, 16, 0,
1, 0, 0, 0, 166, 142,
32, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0,
0, 7, 18, 0, 16, 0,
0, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0,
42, 0, 16, 0, 1, 0,
0, 0, 1, 0, 0, 7,
18, 0, 16, 0, 0, 0,
0, 0, 58, 0, 16, 0,
1, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0,
31, 0, 4, 3, 10, 0,
16, 0, 0, 0, 0, 0,
78, 0, 0, 9, 0, 208,
0, 0, 50, 0, 16, 0,
0, 0, 0, 0, 230, 10,
16, 0, 0, 0, 0, 0,
70, 128, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
35, 0, 0, 10, 66, 0,
16, 0, 0, 0, 0, 0,
26, 0, 16, 0, 1, 0,
0, 0, 42, 128, 32, 0,
0, 0, 0, 0, 0, 0,
0, 0, 10, 0, 16, 0,
1, 0, 0, 0, 167, 0,
0, 139, 2, 99, 0, 128,
131, 153, 25, 0, 114, 0,
16, 0, 1, 0, 0, 0,
42, 0, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 0, 0, 70, 114,
16, 0, 0, 0, 0, 0,
1, 0, 0, 10, 114, 0,
16, 0, 2, 0, 0, 0,
134, 1, 16, 0, 1, 0,
0, 0, 2, 64, 0, 0,
255, 255, 0, 0, 255, 0,
0, 0, 255, 0, 0, 0,
0, 0, 0, 0, 85, 0,
0, 10, 194, 0, 16, 0,
0, 0, 0, 0, 6, 4,
16, 0, 1, 0, 0, 0,
2, 64, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
16, 0, 0, 0, 31, 0,
0, 0, 54, 0, 0, 5,
130, 0, 16, 0, 2, 0,
0, 0, 42, 0, 16, 0,
0, 0, 0, 0, 35, 0,
0, 10, 50, 0, 16, 0,
3, 0, 0, 0, 198, 0,
16, 0, 2, 0, 0, 0,
70, 128, 32, 0, 0, 0,
0, 0, 0, 0, 0, 0,
70, 0, 16, 0, 0, 0,
0, 0, 54, 0, 0, 8,
194, 0, 16, 0, 3, 0,
0, 0, 2, 64, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 45, 0,
0, 137, 194, 0, 0, 128,
67, 85, 21, 0, 242, 0,
16, 0, 3, 0, 0, 0,
70, 14, 16, 0, 3, 0,
0, 0, 70, 126, 16, 0,
1, 0, 0, 0, 138, 0,
0, 15, 242, 0, 16, 0,
4, 0, 0, 0, 2, 64,
0, 0, 8, 0, 0, 0,
8, 0, 0, 0, 8, 0,
0, 0, 8, 0, 0, 0,
2, 64, 0, 0, 8, 0,
0, 0, 16, 0, 0, 0,
8, 0, 0, 0, 16, 0,
0, 0, 166, 5, 16, 0,
1, 0, 0, 0, 43, 0,
0, 5, 18, 0, 16, 0,
5, 0, 0, 0, 26, 0,
16, 0, 2, 0, 0, 0,
43, 0, 0, 5, 98, 0,
16, 0, 5, 0, 0, 0,
6, 1, 16, 0, 4, 0,
0, 0, 56, 0, 0, 10,
210, 0, 16, 0, 1, 0,
0, 0, 6, 9, 16, 0,
5, 0, 0, 0, 2, 64,
0, 0, 129, 128, 128, 59,
0, 0, 0, 0, 129, 128,
128, 59, 129, 128, 128, 59,
43, 0, 0, 5, 18, 0,
16, 0, 2, 0, 0, 0,
42, 0, 16, 0, 2, 0,
0, 0, 43, 0, 0, 5,
98, 0, 16, 0, 2, 0,
0, 0, 166, 11, 16, 0,
4, 0, 0, 0, 56, 0,
0, 10, 114, 0, 16, 0,
2, 0, 0, 0, 70, 2,
16, 0, 2, 0, 0, 0,
2, 64, 0, 0, 129, 128,
128, 59, 129, 128, 128, 59,
129, 128, 128, 59, 0, 0,
0, 0, 1, 0, 0, 8,
18, 0, 16, 0, 0, 0,
0, 0, 42, 128, 32, 0,
0, 0, 0, 0, 1, 0,
0, 0, 1, 64, 0, 0,
255, 0, 0, 0, 138, 0,
0, 16, 50, 0, 16, 0,
4, 0, 0, 0, 2, 64,
0, 0, 8, 0, 0, 0,
8, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
2, 64, 0, 0, 8, 0,
0, 0, 16, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 166, 138, 32, 0,
0, 0, 0, 0, 1, 0,
0, 0, 43, 0, 0, 5,
18, 0, 16, 0, 5, 0,
0, 0, 10, 0, 16, 0,
0, 0, 0, 0, 43, 0,
0, 5, 98, 0, 16, 0,
5, 0, 0, 0, 6, 1,
16, 0, 4, 0, 0, 0,
56, 0, 0, 7, 114, 0,
16, 0, 4, 0, 0, 0,
70, 2, 16, 0, 2, 0,
0, 0, 70, 2, 16, 0,
5, 0, 0, 0, 138, 0,
0, 15, 114, 0, 16, 0,
5, 0, 0, 0, 2, 64,
0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
2, 64, 0, 0, 28, 0,
0, 0, 25, 0, 0, 0,
27, 0, 0, 0, 0, 0,
0, 0, 86, 5, 16, 0,
1, 0, 0, 0, 56, 0,
0, 10, 114, 0, 16, 0,
4, 0, 0, 0, 70, 2,
16, 0, 4, 0, 0, 0,
2, 64, 0, 0, 129, 128,
128, 59, 129, 128, 128, 59,
129, 128, 128, 59, 0, 0,
0, 0, 55, 0, 0, 9,
114, 0, 16, 0, 2, 0,
0, 0, 6, 0, 16, 0,
5, 0, 0, 0, 70, 2,
16, 0, 4, 0, 0, 0,
70, 2, 16, 0, 2, 0,
0, 0, 56, 0, 0, 10,
114, 0, 16, 0, 4, 0,
0, 0, 70, 2, 16, 0,
2, 0, 0, 0, 2, 64,
0, 0, 0, 0, 0, 63,
0, 0, 0, 63, 0, 0,
0, 63, 0, 0, 0, 0,
55, 0, 0, 9, 114, 0,
16, 0, 2, 0, 0, 0,
86, 5, 16, 0, 5, 0,
0, 0, 70, 2, 16, 0,
4, 0, 0, 0, 70, 2,
16, 0, 2, 0, 0, 0,
0, 0, 0, 8, 18, 0,
16, 0, 0, 0, 0, 0,
58, 0, 16, 128, 65, 0,
0, 0, 3, 0, 0, 0,
1, 64, 0, 0, 0, 0,
128, 63, 56, 0, 0, 7,
114, 0, 16, 0, 3, 0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 0,
70, 2, 16, 0, 1, 0,
0, 0, 18, 0, 0, 1,
1, 0, 0, 8, 130, 0,
16, 0, 0, 0, 0, 0,
58, 128, 32, 0, 0, 0,
0, 0, 1, 0, 0, 0,
1, 64, 0, 0, 255, 0,
0, 0, 138, 0, 0, 16,
50, 0, 16, 0, 1, 0,
0, 0, 2, 64, 0, 0,
8, 0, 0, 0, 8, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 64,
0, 0, 8, 0, 0, 0,
16, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
246, 143, 32, 0, 0, 0,
0, 0, 1, 0, 0, 0,
43, 0, 0, 5, 18, 0,
16, 0, 2, 0, 0, 0,
58, 0, 16, 0, 0, 0,
0, 0, 43, 0, 0, 5,
98, 0, 16, 0, 2, 0,
0, 0, 6, 1, 16, 0,
1, 0, 0, 0, 56, 0,
0, 10, 114, 0, 16, 0,
0, 0, 0, 0, 70, 2,
16, 0, 2, 0, 0, 0,
2, 64, 0, 0, 129, 128,
128, 59, 129, 128, 128, 59,
129, 128, 128, 59, 0, 0,
0, 0, 21, 0, 0, 1,
54, 0, 0, 5, 114, 32,
16, 0, 0, 0, 0, 0,
70, 2, 16, 0, 0, 0,
0, 0, 54, 0, 0, 5,
130, 32, 16, 0, 0, 0,
0, 0, 1, 64, 0, 0,
0, 0, 128, 63, 62, 0,
0, 1
};