wangzhibo
2023-10-31 86070cd00485c47a2c5c3ffa4a9bae6648dd05c6
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
2­T±7šƒ9Ï¿À.O6784271c1c62P‹ò    aPosition _uaPositionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõaBlurRenderTaskAddress_uaBlurRenderTaskAddressÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõaBlurSourceTaskAddress_uaBlurSourceTaskAddressÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõaBlurDirection_uaBlurDirectionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ\‹ò
uTransform _uuTransformÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ^‹sColor0    _usColor0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ^‹ sRenderTasks_usRenderTasksÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿŒŒR‹ò
oFragColor _uoFragColorÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ^‹^‹ÿÿÿÿL-hÁ±ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ<<ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ"struct VS_OUTPUT
{
    float4 dx_Position : SV_Position;
    float4 gl_Position : TEXCOORD5;
    nointerpolation float4 v0 : TEXCOORD0;
    float2 v1 : TEXCOORD1;
    nointerpolation float2 v2 : TEXCOORD2;
    nointerpolation int2 v3 : TEXCOORD3;
    nointerpolation float2 v4 : TEXCOORD4;
};
#pragma warning( disable: 3556 3571 )
float2 vec2_ctor_int2(int2 x0)
{
    return float2(x0);
}
int int_ctor(float x0)
{
    return int(x0);
}
int int_ctor_uint(uint x0)
{
    return int(x0);
}
uint uint_ctor_int(int x0)
{
    return uint(x0);
}
// Uniforms
 
uniform float4x4 _uTransform : register(c0);
static const uint _sColor0 = 0;
static const uint _sRenderTasks = 1;
uniform Texture2D<float4> textures2D[2] : register(t0);
uniform SamplerState samplers2D[2] : register(s0);
#ifdef ANGLE_ENABLE_LOOP_FLATTEN
#define LOOP [loop]
#define FLATTEN [flatten]
#else
#define LOOP
#define FLATTEN
#endif
 
#define ATOMIC_COUNTER_ARRAY_STRIDE 4
 
// Attributes
static float2 _aPosition = {0, 0};
static int _aBlurRenderTaskAddress = {0};
static int _aBlurSourceTaskAddress = {0};
static int _aBlurDirection = {0};
 
static float4 gl_Position = float4(0, 0, 0, 0);
 
// Varyings
static  float2 _vUv = {0, 0};
static nointerpolation float4 _vUvRect = {0, 0, 0, 0};
static nointerpolation float2 _vOffsetScale = {0, 0};
static nointerpolation int2 _vSupport = {0, 0};
static nointerpolation float2 _vGaussCoefficients = {0, 0};
 
cbuffer DriverConstants : register(b1)
{
    float4 dx_ViewAdjust : packoffset(c1);
    float2 dx_ViewCoords : packoffset(c2);
    float2 dx_ViewScale  : packoffset(c3);
    float clipControlOrigin : packoffset(c3.w);
    float clipControlZeroToOne : packoffset(c4);
    struct SamplerMetadata
    {
        int baseLevel;
        int internalFormatBits;
        int wrapModes;
        int padding;
        int4 intBorderColor;
    };
    SamplerMetadata samplerMetadata[2] : packoffset(c5);
};
 
int2 gl_texture2DSize(uint samplerIndex, int lod)
{
    int baseLevel = 0;
    uint width; uint height; uint numberOfLevels;
    textures2D[samplerIndex].GetDimensions(baseLevel, width, height, numberOfLevels);
    width = max(width >> lod, 1);
    height = max(height >> lod, 1);
    return int2(width, height);
}
 
float4 gl_texture2DFetch(uint samplerIndex, int2 t, int mip)
{
    return textures2D[samplerIndex].Load(int3(t.x, t.y, mip));
}
 
@@ VERTEX ATTRIBUTES @@
 
VS_OUTPUT generateOutput(VS_INPUT input)
{
    VS_OUTPUT output;
    output.gl_Position = gl_Position;
    output.dx_Position.x = gl_Position.x;
    output.dx_Position.y = clipControlOrigin * gl_Position.y;
    if (clipControlZeroToOne)
    {
        output.dx_Position.z = gl_Position.z;
    } else {
        output.dx_Position.z = (gl_Position.z + gl_Position.w) * 0.5;
    }
    output.dx_Position.w = gl_Position.w;
    output.v0 = _vUvRect;
    output.v1 = _vUv;
    output.v2 = _vOffsetScale;
    output.v3 = _vSupport;
    output.v4 = _vGaussCoefficients;
 
    return output;
}
 
VS_OUTPUT main(VS_INPUT input){
    initAttributes(input);
 
int2 _tmpvar_15618 = {0, 0};
(_tmpvar_15618.x = int_ctor_uint((2 * (uint_ctor_int(_aBlurRenderTaskAddress) % 512))));
(_tmpvar_15618.y = int_ctor_uint((uint_ctor_int(_aBlurRenderTaskAddress) / 512)));
float4 _tmpvar_25619 = {0, 0, 0, 0};
(_tmpvar_25619 = gl_texture2DFetch(_sRenderTasks, _tmpvar_15618, 0));
float4 _tmpvar_35620 = {0, 0, 0, 0};
(_tmpvar_35620 = gl_texture2DFetch(_sRenderTasks, (_tmpvar_15618 + int2(1, 0)), 0));
int2 _tmpvar_45621 = {0, 0};
(_tmpvar_45621.x = int_ctor_uint((2 * (uint_ctor_int(_aBlurSourceTaskAddress) % 512))));
(_tmpvar_45621.y = int_ctor_uint((uint_ctor_int(_aBlurSourceTaskAddress) / 512)));
float4 _tmpvar_55622 = {0, 0, 0, 0};
(_tmpvar_55622 = gl_texture2DFetch(_sRenderTasks, _tmpvar_45621, 0));
float2 _tmpvar_65623 = {0, 0};
(_tmpvar_65623 = vec2_ctor_int2(gl_texture2DSize(_sColor0, 0)));
(_vSupport.x = (int_ctor(ceil((1.5 * _tmpvar_35620.x))) * 2));
if ((0 < _vSupport.x))
{
int _i_75624 = {0};
float _gauss_coefficient_total_85625 = {0};
float3 _gauss_coefficient_95626 = {0, 0, 0};
float _tmpvar_105627 = {0};
(_tmpvar_105627 = exp((-0.5 / (_tmpvar_35620.x * _tmpvar_35620.x))));
float2 _tmpvar_115628 = {0, 0};
(_tmpvar_115628.x = (1.0 / (2.506628 * _tmpvar_35620.x)));
(_tmpvar_115628.y = _tmpvar_105627);
(_vGaussCoefficients = _tmpvar_115628);
float3 _tmpvar_125629 = {0, 0, 0};
(_tmpvar_125629.xy = _tmpvar_115628);
(_tmpvar_125629.z = (_tmpvar_105627 * _tmpvar_105627));
(_gauss_coefficient_95626 = _tmpvar_125629);
(_gauss_coefficient_total_85625 = _tmpvar_125629.x);
(_i_75624 = 1);
{ for(; (_vSupport.x >= _i_75624); (_i_75624 += 2))
{
(_gauss_coefficient_95626.xy = (_gauss_coefficient_95626.xy * _gauss_coefficient_95626.yz));
float _tmpvar_135630 = {0};
(_tmpvar_135630 = _gauss_coefficient_95626.x);
(_gauss_coefficient_95626.xy = (_gauss_coefficient_95626.xy * _gauss_coefficient_95626.yz));
(_gauss_coefficient_total_85625 = (_gauss_coefficient_total_85625 + (2.0 * (_tmpvar_135630 + _gauss_coefficient_95626.x))));
}
}
(_vGaussCoefficients.x = (_tmpvar_115628.x / _gauss_coefficient_total_85625));
}
else
{
(_vGaussCoefficients = float2(1.0, 1.0));
}
bool _tmpvar_145631 = {0};
bool _tmpvar_155632 = {0};
(_tmpvar_155632 = false);
(_tmpvar_145631 = (0 == _aBlurDirection));
if (_tmpvar_145631)
{
float2 _tmpvar_165633 = {0, 0};
(_tmpvar_165633.y = 0.0);
(_tmpvar_165633.x = (1.0 / _tmpvar_65623.x));
(_vOffsetScale = _tmpvar_165633);
(_tmpvar_155632 = true);
}
(_tmpvar_145631 = (_tmpvar_145631 || (1 == _aBlurDirection)));
(_tmpvar_145631 = (_tmpvar_145631 && (!_tmpvar_155632)));
if (_tmpvar_145631)
{
float2 _tmpvar_175634 = {0, 0};
(_tmpvar_175634.x = 0.0);
(_tmpvar_175634.y = (1.0 / _tmpvar_65623.y));
(_vOffsetScale = _tmpvar_175634);
(_tmpvar_155632 = true);
}
(_tmpvar_145631 = (!_tmpvar_155632));
if (_tmpvar_145631)
{
(_vOffsetScale = float2(0.0, 0.0));
}
float4 _tmpvar_185635 = {0, 0, 0, 0};
(_tmpvar_185635.xy = (_tmpvar_55622.xy + float2(0.5, 0.5)));
(_tmpvar_185635.zw = ((_tmpvar_55622.xy + _tmpvar_35620.yz) - float2(0.5, 0.5)));
(_vUvRect = (_tmpvar_185635 / _tmpvar_65623.xyxy));
(_vUv = lerp((_tmpvar_55622.xy / _tmpvar_65623), (_tmpvar_55622.zw / _tmpvar_65623), _aPosition));
float4 _tmpvar_195636 = {0, 0, 0, 0};
(_tmpvar_195636.zw = float2(0.0, 1.0));
(_tmpvar_195636.xy = lerp(_tmpvar_25619.xy, _tmpvar_25619.zw, _aPosition));
(gl_Position = mul(transpose(_uTransform), _tmpvar_195636));
return generateOutput(input);
}
á struct PS_INPUT
{
    float4 dx_Position : SV_Position;
    float4 gl_Position : TEXCOORD5;
    nointerpolation float4 v0 : TEXCOORD0;
    float2 v1 : TEXCOORD1;
    nointerpolation float2 v2 : TEXCOORD2;
    nointerpolation int2 v3 : TEXCOORD3;
    nointerpolation float2 v4 : TEXCOORD4;
};
 
#pragma warning( disable: 3556 3571 )
float float_ctor_int(int x0)
{
    return float(x0);
}
float4 vec4_ctor(float x0)
{
    return float4(x0, x0, x0, x0);
}
// Uniforms
 
static const uint _sColor0 = 0;
uniform Texture2D<float4> textures2D[1] : register(t0);
uniform SamplerState samplers2D[1] : register(s0);
#ifdef ANGLE_ENABLE_LOOP_FLATTEN
#define LOOP [loop]
#define FLATTEN [flatten]
#else
#define LOOP
#define FLATTEN
#endif
 
#define ATOMIC_COUNTER_ARRAY_STRIDE 4
 
// Varyings
static  float2 _vUv = {0, 0};
static nointerpolation float4 _vUvRect = {0, 0, 0, 0};
static nointerpolation float2 _vOffsetScale = {0, 0};
static nointerpolation int2 _vSupport = {0, 0};
static nointerpolation float2 _vGaussCoefficients = {0, 0};
 
static float4 out_oFragColor = {0, 0, 0, 0};
 
cbuffer DriverConstants : register(b1)
{
    struct SamplerMetadata
    {
        int baseLevel;
        int internalFormatBits;
        int wrapModes;
        int padding;
        int4 intBorderColor;
    };
    SamplerMetadata samplerMetadata[1] : packoffset(c5);
};
 
float4 gl_texture2D(uint samplerIndex, float2 t)
{
    return textures2D[samplerIndex].Sample(samplers2D[samplerIndex], float2(t.x, t.y));
}
 
@@ PIXEL OUTPUT @@
 
PS_OUTPUT main(PS_INPUT input){
    _vUvRect = input.v0;
    _vUv = input.v1.xy;
    _vOffsetScale = input.v2.xy;
    _vSupport = input.v3.xy;
    _vGaussCoefficients = input.v4.xy;
 
int _i_15613 = {0};
float _avg_color_25614 = {0};
float3 _gauss_coefficient_35615 = {0, 0, 0};
float3 _tmpvar_45616 = {0, 0, 0};
(_tmpvar_45616.xy = _vGaussCoefficients);
(_tmpvar_45616.z = (_vGaussCoefficients.y * _vGaussCoefficients.y));
(_gauss_coefficient_35615 = _tmpvar_45616);
(_avg_color_25614 = (gl_texture2D(_sColor0, _vUv).x * _vGaussCoefficients.x));
int _tmpvar_55617 = {0};
(_tmpvar_55617 = min(_vSupport.x, 300));
(_i_15613 = 1);
{LOOP for(; (_tmpvar_55617 >= _i_15613); (_i_15613 += 2))
{
float _gauss_coefficient_subtotal_65618 = {0};
(_gauss_coefficient_35615.xy = (_gauss_coefficient_35615.xy * _gauss_coefficient_35615.yz));
float _tmpvar_75619 = {0};
(_tmpvar_75619 = _gauss_coefficient_35615.x);
(_gauss_coefficient_35615.xy = (_gauss_coefficient_35615.xy * _gauss_coefficient_35615.yz));
(_gauss_coefficient_subtotal_65618 = (_tmpvar_75619 + _gauss_coefficient_35615.x));
float2 _tmpvar_85620 = {0, 0};
(_tmpvar_85620 = (_vOffsetScale * (float_ctor_int(_i_15613) + (_gauss_coefficient_35615.x / _gauss_coefficient_subtotal_65618))));
(_avg_color_25614 = (_avg_color_25614 + ((gl_texture2D(_sColor0, max((_vUv - _tmpvar_85620), _vUvRect.xy)).x + gl_texture2D(_sColor0, min((_vUv + _tmpvar_85620), _vUvRect.zw)).x) * _gauss_coefficient_subtotal_65618)));
}
}
(out_oFragColor = vec4_ctor(_avg_color_25614));
return generateOutput();
}
R‹out_oFragColorout_oFragColorÑstruct GS_INPUT
{
    float4 dx_Position : SV_Position;
    float4 gl_Position : TEXCOORD5;
    nointerpolation float4 v0 : TEXCOORD0;
    float2 v1 : TEXCOORD1;
    nointerpolation float2 v2 : TEXCOORD2;
    nointerpolation int2 v3 : TEXCOORD3;
    nointerpolation float2 v4 : TEXCOORD4;
};
 
struct GS_OUTPUT
{
    float4 dx_Position : SV_Position;
    float4 gl_Position : TEXCOORD5;
    nointerpolation float4 v0 : TEXCOORD0;
    float2 v1 : TEXCOORD1;
    nointerpolation float2 v2 : TEXCOORD2;
    nointerpolation int2 v3 : TEXCOORD3;
    nointerpolation float2 v4 : TEXCOORD4;
};
 
void copyVertex(inout GS_OUTPUT output, GS_INPUT input, GS_INPUT flatinput)
{
    output.gl_Position = input.gl_Position;
    output.v0 = flatinput.v0; 
    output.v1 = input.v1; 
    output.v2 = flatinput.v2; 
    output.v3 = flatinput.v3; 
    output.v4 = flatinput.v4; 
#ifndef ANGLE_POINT_SPRITE_SHADER
    output.dx_Position = input.dx_Position;
#endif  // ANGLE_POINT_SPRITE_SHADER
}
¶¿¿¿TDXBC
7ƒ´"yëö£æ8T4ÈD¸RDEFŒô<þÿÁdRD11< ($ ¼ÿÿÿÿ Êÿÿÿÿ Øátextures2D[0]textures2D[1]$GlobalsDriverConstants«««Ø$@ሐL@dÿÿÿÿÿÿÿÿ_uTransformfloat4x4«««Xxÿÿÿÿÿÿÿÿ´ Ìÿÿÿÿÿÿÿÿð0Ìÿÿÿÿÿÿÿÿý<ÿÿÿÿÿÿÿÿ<@ÿÿÿÿÿÿÿÿQP@@ÿÿÿÿÿÿÿÿdx_ViewAdjustfloat4«««†dx_ViewCoordsfloat2«««Âdx_ViewScaleclipControlOriginfloat«««clipControlZeroToOnesamplerMetadataSamplerMetadatabaseLevelint«{internalFormatBitswrapModespaddingintBorderColorint4«««Øq€¤€·€Á€ ÉàaMicrosoft (R) HLSL Shader Compiler 10.1ISGNthhhhTEXCOORD«««OSGNȰ¼¼¼ ¼ ¼ ¼ SV_PositionTEXCOORD«««SHEXœ    PgjYFŽ YFŽ XpUUXpUU_2___gò eò eò e2 e2 e e2 hŒ @    @
@U"
@    6Â@-‰Â€CUòFF~
2F@6Â@-‰Â€CUrFF~Œ @    @
@U"
@    6Â@-‰Â€CUòFF~=‰Â€CU2@F~S
òF@+òF8‚
@À?B‚:‚:)‚:@"@:
8
 
@¿
8
@;ª¸?
8
@˜l @
@€?€?€?€?
8B
 
6
6"
6"@6B
0"‚::6‚82¶F82–F2    ‚
:
2    B:@@*"@62F 
*6" 
62 @€?€?
2@€?€?€?€?æ
7    
@
6"@ 
Â@<:*;*
 
6Â@ÿÿÿÿ7    rf F2 F¦
 
2F@??2–F
Â@¿¿ò FFòFF2F€Aæ
2    2 FFF2F€Aæ
2    2FFF6B@€?Fƒ F"Fƒ FBFƒ F‚Fƒ F8" :€ 9 @
€ ":*8"@?7    B 
*6’  6ò F6‚ @6B :>STAT”Q àŒ(DXBCZiz¼MÏÒ£ƒa
èàŠØ(4üÌŒRDEFÀ<ÿÿÁ˜RD11< ($ |Šÿÿÿÿ samplers2D[0]textures2D[0]Microsoft (R) HLSL Shader Compiler 10.1ISGNȰ¼¼¼¼¼ ¼SV_PositionTEXCOORD«««OSGN, SV_TARGET««SHEX„PájZ`XpUUbòb2b2bBb2eò h8BE‹Â€CUFF~`8
 
%"*@,6Â6@6"
0"B
*6‚:82¶æ
82–F2    ‚*:
+B
‚
:B:*2
2F€A¦
F42FFE‹Â€CU‚F–s`2    2F¦
F32FæE‹Â€CUBF–|`B*:2    "*:
@6Â6ò V>STAT” ¦“?°UEÁ?xV