-
Notifications
You must be signed in to change notification settings - Fork 28
/
gb-pass-2.glsl
183 lines (177 loc) · 5.65 KB
/
gb-pass-2.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
// 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 vec2 _upper_bound;
COMPAT_VARYING vec2 _lower_bound;
COMPAT_VARYING vec2 _texel1;
struct input_dummy {
vec2 _video_size;
vec2 _texture_size;
vec2 _output_dummy_size;
float _frame_count;
float _placeholder30;
};
struct texture_info {
vec2 _texel1;
vec2 _lower_bound;
vec2 _upper_bound;
};
vec4 _oPosition1;
texture_info _oTexInfo1;
input_dummy _IN1;
vec4 _r0007;
COMPAT_ATTRIBUTE vec4 VertexCoord;
COMPAT_ATTRIBUTE vec4 TexCoord;
COMPAT_VARYING vec4 TEX0;
COMPAT_VARYING vec4 TEX1;
COMPAT_VARYING vec4 TEX2;
COMPAT_VARYING vec4 TEX3;
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()
{
vec2 _oTexCoord;
vec2 _texel;
texture_info _TMP3;
_r0007 = VertexCoord.x*MVPMatrix[0];
_r0007 = _r0007 + VertexCoord.y*MVPMatrix[1];
_r0007 = _r0007 + VertexCoord.z*MVPMatrix[2];
_r0007 = _r0007 + VertexCoord.w*MVPMatrix[3];
_oPosition1 = _r0007;
_oTexCoord = TexCoord.xy;
_texel = 1.00000000E+00/TextureSize;
_TMP3._upper_bound = _texel*(OutputSize - 1.00000000E+00);
_oTexInfo1._texel1 = _texel;
_oTexInfo1._lower_bound = vec2( 0.00000000E+00, 0.00000000E+00);
_oTexInfo1._upper_bound = _TMP3._upper_bound;
gl_Position = _r0007;
TEX0.xy = TexCoord.xy;
TEX1.xy = _texel;
TEX2.xy = vec2( 0.00000000E+00, 0.00000000E+00);
TEX3.xy = _TMP3._upper_bound;
}
#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 vec2 _upper_bound;
COMPAT_VARYING vec2 _lower_bound;
COMPAT_VARYING vec2 _texel;
struct input_dummy {
vec2 _video_size;
vec2 _texture_size;
vec2 _output_dummy_size;
float _frame_count;
float _placeholder26;
};
struct texture_info {
vec2 _texel;
vec2 _lower_bound;
vec2 _upper_bound;
};
vec4 _ret_0;
vec4 _TMP7;
vec2 _TMP8;
vec4 _TMP5;
vec4 _TMP3;
input_dummy _IN1;
vec4 _out_color0014;
vec2 _TMP15;
vec2 _TMP23;
vec2 _x0024;
vec2 _TMP31;
vec2 _x0032;
COMPAT_VARYING vec4 TEX0;
COMPAT_VARYING vec4 TEX1;
COMPAT_VARYING vec4 TEX2;
COMPAT_VARYING vec4 TEX3;
uniform sampler2D Texture;
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
void main()
{
_TMP8 = min(TEX3.xy, TEX0.xy);
_TMP15 = max(TEX2.xy, _TMP8);
_TMP3 = COMPAT_TEXTURE(Texture, _TMP15);
_out_color0014 = vec4(float((_TMP3*1.34765625E-01).x), float((_TMP3*1.34765625E-01).y), float((_TMP3*1.34765625E-01).z), float((_TMP3*1.34765625E-01).w));
_x0024 = TEX0.xy + vec2(float(float(TEX1.x)), 0.00000000E+00);
_TMP8 = min(TEX3.xy, _x0024);
_TMP23 = max(TEX2.xy, _TMP8);
_TMP5 = COMPAT_TEXTURE(Texture, _TMP23);
_out_color0014.w = float((float(_out_color0014.w) + _TMP5.w*1.30859375E-01));
_x0032 = TEX0.xy - vec2(float(float(TEX1.x)), 0.00000000E+00);
_TMP8 = min(TEX3.xy, _x0032);
_TMP31 = max(TEX2.xy, _TMP8);
_TMP7 = COMPAT_TEXTURE(Texture, _TMP31);
_out_color0014.w = float((float(_out_color0014.w) + _TMP7.w*1.30859375E-01));
_x0024 = TEX0.xy + vec2(float(float((2.00000000E+00*TEX1.x))), 0.00000000E+00);
_TMP8 = min(TEX3.xy, _x0024);
_TMP23 = max(TEX2.xy, _TMP8);
_TMP5 = COMPAT_TEXTURE(Texture, _TMP23);
_out_color0014.w = float((float(_out_color0014.w) + _TMP5.w*1.19140625E-01));
_x0032 = TEX0.xy - vec2(float(float((2.00000000E+00*TEX1.x))), 0.00000000E+00);
_TMP8 = min(TEX3.xy, _x0032);
_TMP31 = max(TEX2.xy, _TMP8);
_TMP7 = COMPAT_TEXTURE(Texture, _TMP31);
_out_color0014.w = float((float(_out_color0014.w) + _TMP7.w*1.19140625E-01));
_x0024 = TEX0.xy + vec2(float(float((3.00000000E+00*TEX1.x))), 0.00000000E+00);
_TMP8 = min(TEX3.xy, _x0024);
_TMP23 = max(TEX2.xy, _TMP8);
_TMP5 = COMPAT_TEXTURE(Texture, _TMP23);
_out_color0014.w = float((float(_out_color0014.w) + _TMP5.w*1.01562500E-01));
_x0032 = TEX0.xy - vec2(float(float((3.00000000E+00*TEX1.x))), 0.00000000E+00);
_TMP8 = min(TEX3.xy, _x0032);
_TMP31 = max(TEX2.xy, _TMP8);
_TMP7 = COMPAT_TEXTURE(Texture, _TMP31);
_out_color0014.w = float((float(_out_color0014.w) + _TMP7.w*1.01562500E-01));
_x0024 = TEX0.xy + vec2(float(float((4.00000000E+00*TEX1.x))), 0.00000000E+00);
_TMP8 = min(TEX3.xy, _x0024);
_TMP23 = max(TEX2.xy, _TMP8);
_TMP5 = COMPAT_TEXTURE(Texture, _TMP23);
_out_color0014.w = float((float(_out_color0014.w) + _TMP5.w*8.20312500E-02));
_x0032 = TEX0.xy - vec2(float(float((4.00000000E+00*TEX1.x))), 0.00000000E+00);
_TMP8 = min(TEX3.xy, _x0032);
_TMP31 = max(TEX2.xy, _TMP8);
_TMP7 = COMPAT_TEXTURE(Texture, _TMP31);
_out_color0014.w = float((float(_out_color0014.w) + _TMP7.w*8.20312500E-02));
_ret_0 = vec4(float(_out_color0014.x), float(_out_color0014.y), float(_out_color0014.z), float(_out_color0014.w));
FragColor = _ret_0;
return;
}
#endif