-
Notifications
You must be signed in to change notification settings - Fork 28
/
dot.glsl
359 lines (353 loc) · 10.4 KB
/
dot.glsl
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
// GLSL shader autogenerated by cg2glsl.py.
#if defined(VERTEX)
#if __VERSION__ >= 130
#define COMPAT_VARYING out
#define COMPAT_ATTRIBUTE in
#define COMPAT_TEXTURE texture
#else
#define COMPAT_VARYING varying
#define COMPAT_ATTRIBUTE attribute
#define COMPAT_TEXTURE texture2D
#endif
#ifdef GL_ES
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
COMPAT_VARYING float _frame_rotation;
COMPAT_VARYING vec2 _pixel_no;
COMPAT_VARYING vec2 _c11;
COMPAT_VARYING vec4 _c12_22;
COMPAT_VARYING vec4 _c21_02;
COMPAT_VARYING vec4 _c20_01;
COMPAT_VARYING vec4 _c00_10;
struct tex_coord {
vec4 _c00_10;
vec4 _c20_01;
vec4 _c21_02;
vec4 _c12_22;
vec2 _c11;
vec2 _pixel_no;
};
struct input_dummy {
vec2 _video_size;
vec2 _texture_size;
vec2 _output_dummy_size;
float _frame_count;
float _frame_direction;
float _frame_rotation;
};
vec4 _oPosition1;
input_dummy _IN1;
vec4 _r0017;
COMPAT_ATTRIBUTE vec4 VertexCoord;
COMPAT_ATTRIBUTE vec4 COLOR;
COMPAT_VARYING vec4 COL0;
COMPAT_ATTRIBUTE vec4 TexCoord;
COMPAT_VARYING vec4 TEX1;
COMPAT_VARYING vec4 TEX2;
COMPAT_VARYING vec4 TEX3;
COMPAT_VARYING vec4 TEX4;
COMPAT_VARYING vec4 TEX5;
COMPAT_VARYING vec4 TEX6;
uniform mat4 MVPMatrix;
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
void main()
{
vec4 _oColor;
tex_coord _coords;
float _dx;
float _dy;
vec2 _TMP6;
vec2 _TMP7;
vec2 _TMP8;
vec2 _TMP9;
vec2 _TMP10;
vec2 _TMP11;
vec2 _TMP12;
vec2 _TMP13;
_r0017 = VertexCoord.x*MVPMatrix[0];
_r0017 = _r0017 + VertexCoord.y*MVPMatrix[1];
_r0017 = _r0017 + VertexCoord.z*MVPMatrix[2];
_r0017 = _r0017 + VertexCoord.w*MVPMatrix[3];
_oPosition1 = _r0017;
_oColor = COLOR;
_dx = 1.00000000E+00/TextureSize.x;
_dy = 1.00000000E+00/TextureSize.y;
_TMP12 = TexCoord.xy + vec2(-_dx, -_dy);
_TMP13 = TexCoord.xy + vec2(0.00000000E+00, -_dy);
_coords._c00_10 = vec4(_TMP12.x, _TMP12.y, _TMP13.x, _TMP13.y);
_TMP10 = TexCoord.xy + vec2(_dx, -_dy);
_TMP11 = TexCoord.xy + vec2(-_dx, 0.00000000E+00);
_coords._c20_01 = vec4(_TMP10.x, _TMP10.y, _TMP11.x, _TMP11.y);
_TMP8 = TexCoord.xy + vec2(_dx, 0.00000000E+00);
_TMP9 = TexCoord.xy + vec2(-_dx, _dy);
_coords._c21_02 = vec4(_TMP8.x, _TMP8.y, _TMP9.x, _TMP9.y);
_TMP6 = TexCoord.xy + vec2(0.00000000E+00, _dy);
_TMP7 = TexCoord.xy + vec2(_dx, _dy);
_coords._c12_22 = vec4(_TMP6.x, _TMP6.y, _TMP7.x, _TMP7.y);
_coords._c11 = TexCoord.xy;
_coords._pixel_no = TexCoord.xy*TextureSize;
gl_Position = _r0017;
COL0 = COLOR;
TEX1 = _coords._c00_10;
TEX2 = _coords._c20_01;
TEX3 = _coords._c21_02;
TEX4 = _coords._c12_22;
TEX5.xy = TexCoord.xy;
TEX6.xy = _coords._pixel_no;
}
#elif defined(FRAGMENT)
#if __VERSION__ >= 130
#define COMPAT_VARYING in
#define COMPAT_TEXTURE texture
out vec4 FragColor;
#else
#define COMPAT_VARYING varying
#define FragColor gl_FragColor
#define COMPAT_TEXTURE texture2D
#endif
#ifdef GL_ES
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
COMPAT_VARYING float _frame_rotation;
COMPAT_VARYING vec2 _pixel_no1;
COMPAT_VARYING vec2 _c11;
COMPAT_VARYING vec4 _c12_22;
COMPAT_VARYING vec4 _c21_02;
COMPAT_VARYING vec4 _c20_01;
COMPAT_VARYING vec4 _c00_10;
struct tex_coord {
vec4 _c00_10;
vec4 _c20_01;
vec4 _c21_02;
vec4 _c12_22;
vec2 _c11;
vec2 _pixel_no1;
};
struct input_dummy {
vec2 _video_size;
vec2 _texture_size;
vec2 _output_dummy_size;
float _frame_count;
float _frame_direction;
float _frame_rotation;
};
vec4 _ret_0;
vec3 _TMP16;
vec4 _TMP15;
vec2 _TMP17;
float _TMP20;
float _TMP21;
vec3 _TMP14;
vec4 _TMP13;
vec3 _TMP12;
vec4 _TMP11;
vec3 _TMP10;
vec4 _TMP9;
vec3 _TMP8;
vec4 _TMP7;
vec3 _TMP6;
vec4 _TMP5;
vec3 _TMP4;
vec4 _TMP3;
vec3 _TMP2;
vec4 _TMP1;
vec4 _TMP0;
uniform sampler2D Texture;
float _TMP33;
vec2 _delta0034;
float _TMP41;
float _bright0042;
float _TMP47;
float _x0048;
float _TMP57;
vec2 _delta0058;
float _TMP65;
float _bright0066;
float _TMP71;
float _x0072;
float _TMP81;
vec2 _delta0082;
float _TMP89;
float _bright0090;
float _TMP95;
float _x0096;
float _TMP105;
vec2 _delta0106;
float _TMP113;
float _bright0114;
float _TMP119;
float _x0120;
float _TMP129;
vec2 _delta0130;
float _TMP137;
float _bright0138;
float _TMP143;
float _x0144;
float _TMP153;
vec2 _delta0154;
float _TMP161;
float _bright0162;
float _TMP167;
float _x0168;
float _TMP177;
vec2 _delta0178;
float _TMP185;
float _bright0186;
float _TMP191;
float _x0192;
float _TMP201;
vec2 _delta0202;
float _TMP209;
float _bright0210;
float _TMP215;
float _x0216;
float _TMP225;
vec2 _delta0226;
float _TMP233;
float _bright0234;
float _TMP239;
float _x0240;
vec3 _a0244;
COMPAT_VARYING vec4 TEX1;
COMPAT_VARYING vec4 TEX2;
COMPAT_VARYING vec4 TEX3;
COMPAT_VARYING vec4 TEX4;
COMPAT_VARYING vec4 TEX5;
COMPAT_VARYING vec4 TEX6;
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
void main()
{
vec3 _mid_color;
vec3 _color2;
vec3 _out_color;
_TMP0 = COMPAT_TEXTURE(Texture, TEX5.xy);
_TMP17 = fract(TEX6.xy);
_delta0034 = _TMP17 - vec2( 5.00000000E-01, 5.00000000E-01);
_TMP20 = dot(_delta0034, _delta0034);
_TMP21 = inversesqrt(_TMP20);
_TMP33 = 1.00000000E+00/_TMP21;
_bright0042 = dot(_TMP0.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP41 = 1.04999995E+00 + _bright0042*-9.99999642E-02;
_x0048 = -2.40000010E+00*_TMP33*_TMP41;
_TMP47 = pow(2.71828198E+00, _x0048);
_mid_color = _TMP0.xyz*_TMP47;
_TMP1 = COMPAT_TEXTURE(Texture, TEX1.xy);
_TMP17 = fract(TEX6.xy);
_delta0058 = _TMP17 - vec2( -5.00000000E-01, -5.00000000E-01);
_TMP20 = dot(_delta0058, _delta0058);
_TMP21 = inversesqrt(_TMP20);
_TMP57 = 1.00000000E+00/_TMP21;
_bright0066 = dot(_TMP1.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP65 = 1.04999995E+00 + _bright0066*-9.99999642E-02;
_x0072 = -2.40000010E+00*_TMP57*_TMP65;
_TMP71 = pow(2.71828198E+00, _x0072);
_TMP2 = _TMP1.xyz*_TMP71;
_TMP3 = COMPAT_TEXTURE(Texture, TEX1.zw);
_TMP17 = fract(TEX6.xy);
_delta0082 = _TMP17 - vec2( 5.00000000E-01, -5.00000000E-01);
_TMP20 = dot(_delta0082, _delta0082);
_TMP21 = inversesqrt(_TMP20);
_TMP81 = 1.00000000E+00/_TMP21;
_bright0090 = dot(_TMP3.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP89 = 1.04999995E+00 + _bright0090*-9.99999642E-02;
_x0096 = -2.40000010E+00*_TMP81*_TMP89;
_TMP95 = pow(2.71828198E+00, _x0096);
_TMP4 = _TMP3.xyz*_TMP95;
_color2 = _TMP2 + _TMP4;
_TMP5 = COMPAT_TEXTURE(Texture, TEX2.xy);
_TMP17 = fract(TEX6.xy);
_delta0106 = _TMP17 - vec2( 1.50000000E+00, -5.00000000E-01);
_TMP20 = dot(_delta0106, _delta0106);
_TMP21 = inversesqrt(_TMP20);
_TMP105 = 1.00000000E+00/_TMP21;
_bright0114 = dot(_TMP5.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP113 = 1.04999995E+00 + _bright0114*-9.99999642E-02;
_x0120 = -2.40000010E+00*_TMP105*_TMP113;
_TMP119 = pow(2.71828198E+00, _x0120);
_TMP6 = _TMP5.xyz*_TMP119;
_color2 = _color2 + _TMP6;
_TMP7 = COMPAT_TEXTURE(Texture, TEX2.zw);
_TMP17 = fract(TEX6.xy);
_delta0130 = _TMP17 - vec2( -5.00000000E-01, 5.00000000E-01);
_TMP20 = dot(_delta0130, _delta0130);
_TMP21 = inversesqrt(_TMP20);
_TMP129 = 1.00000000E+00/_TMP21;
_bright0138 = dot(_TMP7.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP137 = 1.04999995E+00 + _bright0138*-9.99999642E-02;
_x0144 = -2.40000010E+00*_TMP129*_TMP137;
_TMP143 = pow(2.71828198E+00, _x0144);
_TMP8 = _TMP7.xyz*_TMP143;
_color2 = _color2 + _TMP8;
_color2 = _color2 + _mid_color;
_TMP9 = COMPAT_TEXTURE(Texture, TEX3.xy);
_TMP17 = fract(TEX6.xy);
_delta0154 = _TMP17 - vec2( 1.50000000E+00, 5.00000000E-01);
_TMP20 = dot(_delta0154, _delta0154);
_TMP21 = inversesqrt(_TMP20);
_TMP153 = 1.00000000E+00/_TMP21;
_bright0162 = dot(_TMP9.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP161 = 1.04999995E+00 + _bright0162*-9.99999642E-02;
_x0168 = -2.40000010E+00*_TMP153*_TMP161;
_TMP167 = pow(2.71828198E+00, _x0168);
_TMP10 = _TMP9.xyz*_TMP167;
_color2 = _color2 + _TMP10;
_TMP11 = COMPAT_TEXTURE(Texture, TEX3.zw);
_TMP17 = fract(TEX6.xy);
_delta0178 = _TMP17 - vec2( -5.00000000E-01, 1.50000000E+00);
_TMP20 = dot(_delta0178, _delta0178);
_TMP21 = inversesqrt(_TMP20);
_TMP177 = 1.00000000E+00/_TMP21;
_bright0186 = dot(_TMP11.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP185 = 1.04999995E+00 + _bright0186*-9.99999642E-02;
_x0192 = -2.40000010E+00*_TMP177*_TMP185;
_TMP191 = pow(2.71828198E+00, _x0192);
_TMP12 = _TMP11.xyz*_TMP191;
_color2 = _color2 + _TMP12;
_TMP13 = COMPAT_TEXTURE(Texture, TEX4.xy);
_TMP17 = fract(TEX6.xy);
_delta0202 = _TMP17 - vec2( 5.00000000E-01, 1.50000000E+00);
_TMP20 = dot(_delta0202, _delta0202);
_TMP21 = inversesqrt(_TMP20);
_TMP201 = 1.00000000E+00/_TMP21;
_bright0210 = dot(_TMP13.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP209 = 1.04999995E+00 + _bright0210*-9.99999642E-02;
_x0216 = -2.40000010E+00*_TMP201*_TMP209;
_TMP215 = pow(2.71828198E+00, _x0216);
_TMP14 = _TMP13.xyz*_TMP215;
_color2 = _color2 + _TMP14;
_TMP15 = COMPAT_TEXTURE(Texture, TEX4.zw);
_TMP17 = fract(TEX6.xy);
_delta0226 = _TMP17 - vec2( 1.50000000E+00, 1.50000000E+00);
_TMP20 = dot(_delta0226, _delta0226);
_TMP21 = inversesqrt(_TMP20);
_TMP225 = 1.00000000E+00/_TMP21;
_bright0234 = dot(_TMP15.xyz, vec3( 3.00000012E-01, 5.89999974E-01, 1.09999999E-01));
_TMP233 = 1.04999995E+00 + _bright0234*-9.99999642E-02;
_x0240 = -2.40000010E+00*_TMP225*_TMP233;
_TMP239 = pow(2.71828198E+00, _x0240);
_TMP16 = _TMP15.xyz*_TMP239;
_color2 = _color2 + _TMP16;
_a0244 = 1.20000005E+00*_mid_color;
_out_color = _a0244 + 6.49999976E-01*(_color2 - _a0244);
_ret_0 = vec4(_out_color.x, _out_color.y, _out_color.z, 1.00000000E+00);
FragColor = _ret_0;
return;
}
#endif