270 lines
7.7 KiB
GLSL
270 lines
7.7 KiB
GLSL
// 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 vec4 _color1;
|
|
struct output_dummy {
|
|
vec4 _color1;
|
|
};
|
|
struct input_dummy {
|
|
vec2 _video_size;
|
|
vec2 _texture_size;
|
|
vec2 _output_dummy_size;
|
|
float _frame_count;
|
|
float _frame_direction;
|
|
float _frame_rotation;
|
|
};
|
|
vec4 _oPosition1;
|
|
vec4 _r0006;
|
|
COMPAT_ATTRIBUTE vec4 gl_Vertex;
|
|
COMPAT_ATTRIBUTE vec4 COLOR;
|
|
COMPAT_ATTRIBUTE vec4 gl_MultiTexCoord0;
|
|
COMPAT_VARYING vec4 COL0;
|
|
COMPAT_VARYING vec4 TEX0;
|
|
|
|
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;
|
|
vec2 _otexCoord;
|
|
_r0006 = gl_Vertex.x*gl_ModelViewProjectionMatrix[0];
|
|
_r0006 = _r0006 + gl_Vertex.y*gl_ModelViewProjectionMatrix[1];
|
|
_r0006 = _r0006 + gl_Vertex.z*gl_ModelViewProjectionMatrix[2];
|
|
_r0006 = _r0006 + gl_Vertex.w*gl_ModelViewProjectionMatrix[3];
|
|
_oPosition1 = _r0006;
|
|
_oColor = COLOR;
|
|
_otexCoord = gl_MultiTexCoord0.xy;
|
|
gl_Position = _r0006;
|
|
COL0 = COLOR;
|
|
TEX0.xy = gl_MultiTexCoord0.xy;
|
|
}
|
|
#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 vec4 _color;
|
|
struct output_dummy {
|
|
vec4 _color;
|
|
};
|
|
struct input_dummy {
|
|
vec2 _video_size;
|
|
vec2 _texture_size;
|
|
vec2 _output_dummy_size;
|
|
float _frame_count;
|
|
float _frame_direction;
|
|
float _frame_rotation;
|
|
};
|
|
vec3 _TMP11;
|
|
vec3 _TMP10;
|
|
vec3 _TMP9;
|
|
vec4 _TMP17;
|
|
float _TMP8;
|
|
vec4 _TMP7;
|
|
vec4 _TMP6;
|
|
float _TMP16;
|
|
float _TMP15;
|
|
float _TMP14;
|
|
float _TMP13;
|
|
vec4 _TMP5;
|
|
input_dummy _IN1;
|
|
uniform sampler2D Texture;
|
|
vec2 _x0025;
|
|
vec4 _ret0027;
|
|
vec4 _a0029;
|
|
vec4 _TMP30;
|
|
vec4 _x0045;
|
|
vec4 _ret0057;
|
|
vec4 _a0059;
|
|
vec4 _TMP60;
|
|
vec4 _x0075;
|
|
vec2 _c0091;
|
|
vec2 _c0095;
|
|
vec2 _c0099;
|
|
vec2 _c0103;
|
|
vec3 _r0105;
|
|
float _ypos0107;
|
|
vec2 _c0111;
|
|
vec2 _c0115;
|
|
vec2 _c0119;
|
|
vec2 _c0123;
|
|
vec3 _r0125;
|
|
float _ypos0127;
|
|
vec2 _c0131;
|
|
vec2 _c0135;
|
|
vec2 _c0139;
|
|
vec2 _c0143;
|
|
vec3 _r0145;
|
|
float _ypos0147;
|
|
vec2 _c0151;
|
|
vec2 _c0155;
|
|
vec2 _c0159;
|
|
vec2 _c0163;
|
|
vec3 _r0165;
|
|
vec3 _r0167;
|
|
COMPAT_VARYING vec4 TEX0;
|
|
|
|
uniform int FrameDirection;
|
|
uniform int FrameCount;
|
|
uniform COMPAT_PRECISION vec2 OutputSize;
|
|
uniform COMPAT_PRECISION vec2 TextureSize;
|
|
uniform COMPAT_PRECISION vec2 InputSize;
|
|
void main()
|
|
{
|
|
vec2 _stepxy;
|
|
vec2 _pos;
|
|
vec2 _f;
|
|
vec2 _xystart;
|
|
vec4 _xpos2;
|
|
vec4 _linetaps1;
|
|
vec4 _columntaps;
|
|
output_dummy _OUT;
|
|
_stepxy = 1.00000000E+00/TextureSize.xy;
|
|
_pos = TEX0.xy + _stepxy*5.00000000E-01;
|
|
_x0025 = _pos/_stepxy;
|
|
_f = fract(_x0025);
|
|
_xystart = (-1.50000000E+00 - _f)*_stepxy + _pos;
|
|
_xpos2 = vec4(_xystart.x, _xystart.x + _stepxy.x, _xystart.x + _stepxy.x*2.00000000E+00, _xystart.x + _stepxy.x*3.00000000E+00);
|
|
_a0029 = 3.14159274E+00*vec4(1.00000000E+00 + _f.x, _f.x, 1.00000000E+00 - _f.x, 2.00000000E+00 - _f.x);
|
|
_TMP5 = abs(_a0029);
|
|
_TMP30 = max(_TMP5, vec4( 9.99999975E-06, 9.99999975E-06, 9.99999975E-06, 9.99999975E-06));
|
|
_TMP13 = sin(_TMP30.x);
|
|
_TMP14 = sin(_TMP30.y);
|
|
_TMP15 = sin(_TMP30.z);
|
|
_TMP16 = sin(_TMP30.w);
|
|
_TMP6 = vec4(_TMP13, _TMP14, _TMP15, _TMP16);
|
|
_x0045 = _TMP30/2.00000000E+00;
|
|
_TMP13 = sin(_x0045.x);
|
|
_TMP14 = sin(_x0045.y);
|
|
_TMP15 = sin(_x0045.z);
|
|
_TMP16 = sin(_x0045.w);
|
|
_TMP7 = vec4(_TMP13, _TMP14, _TMP15, _TMP16);
|
|
_ret0027 = (_TMP6*_TMP7)/(_TMP30*_TMP30);
|
|
_TMP8 = dot(_ret0027, vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));
|
|
_linetaps1 = _ret0027/_TMP8;
|
|
_a0059 = 3.14159274E+00*vec4(1.00000000E+00 + _f.y, _f.y, 1.00000000E+00 - _f.y, 2.00000000E+00 - _f.y);
|
|
_TMP5 = abs(_a0059);
|
|
_TMP60 = max(_TMP5, vec4( 9.99999975E-06, 9.99999975E-06, 9.99999975E-06, 9.99999975E-06));
|
|
_TMP13 = sin(_TMP60.x);
|
|
_TMP14 = sin(_TMP60.y);
|
|
_TMP15 = sin(_TMP60.z);
|
|
_TMP16 = sin(_TMP60.w);
|
|
_TMP6 = vec4(_TMP13, _TMP14, _TMP15, _TMP16);
|
|
_x0075 = _TMP60/2.00000000E+00;
|
|
_TMP13 = sin(_x0075.x);
|
|
_TMP14 = sin(_x0075.y);
|
|
_TMP15 = sin(_x0075.z);
|
|
_TMP16 = sin(_x0075.w);
|
|
_TMP7 = vec4(_TMP13, _TMP14, _TMP15, _TMP16);
|
|
_ret0057 = (_TMP6*_TMP7)/(_TMP60*_TMP60);
|
|
_TMP8 = dot(_ret0057, vec4( 1.00000000E+00, 1.00000000E+00, 1.00000000E+00, 1.00000000E+00));
|
|
_columntaps = _ret0057/_TMP8;
|
|
_c0091 = vec2(_xpos2.x, _xystart.y);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0091);
|
|
_TMP9 = _TMP17.xyz;
|
|
_c0095 = vec2(_xpos2.y, _xystart.y);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0095);
|
|
_TMP10 = _TMP17.xyz;
|
|
_c0099 = vec2(_xpos2.z, _xystart.y);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0099);
|
|
_TMP11 = _TMP17.xyz;
|
|
_c0103 = vec2(_xpos2.w, _xystart.y);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0103);
|
|
_r0105 = _linetaps1.x*_TMP9;
|
|
_r0105 = _r0105 + _linetaps1.y*_TMP10;
|
|
_r0105 = _r0105 + _linetaps1.z*_TMP11;
|
|
_r0105 = _r0105 + _linetaps1.w*_TMP17.xyz;
|
|
_ypos0107 = _xystart.y + _stepxy.y;
|
|
_c0111 = vec2(_xpos2.x, _ypos0107);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0111);
|
|
_TMP9 = _TMP17.xyz;
|
|
_c0115 = vec2(_xpos2.y, _ypos0107);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0115);
|
|
_TMP10 = _TMP17.xyz;
|
|
_c0119 = vec2(_xpos2.z, _ypos0107);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0119);
|
|
_TMP11 = _TMP17.xyz;
|
|
_c0123 = vec2(_xpos2.w, _ypos0107);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0123);
|
|
_r0125 = _linetaps1.x*_TMP9;
|
|
_r0125 = _r0125 + _linetaps1.y*_TMP10;
|
|
_r0125 = _r0125 + _linetaps1.z*_TMP11;
|
|
_r0125 = _r0125 + _linetaps1.w*_TMP17.xyz;
|
|
_ypos0127 = _xystart.y + _stepxy.y*2.00000000E+00;
|
|
_c0131 = vec2(_xpos2.x, _ypos0127);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0131);
|
|
_TMP9 = _TMP17.xyz;
|
|
_c0135 = vec2(_xpos2.y, _ypos0127);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0135);
|
|
_TMP10 = _TMP17.xyz;
|
|
_c0139 = vec2(_xpos2.z, _ypos0127);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0139);
|
|
_TMP11 = _TMP17.xyz;
|
|
_c0143 = vec2(_xpos2.w, _ypos0127);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0143);
|
|
_r0145 = _linetaps1.x*_TMP9;
|
|
_r0145 = _r0145 + _linetaps1.y*_TMP10;
|
|
_r0145 = _r0145 + _linetaps1.z*_TMP11;
|
|
_r0145 = _r0145 + _linetaps1.w*_TMP17.xyz;
|
|
_ypos0147 = _xystart.y + _stepxy.y*3.00000000E+00;
|
|
_c0151 = vec2(_xpos2.x, _ypos0147);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0151);
|
|
_TMP9 = _TMP17.xyz;
|
|
_c0155 = vec2(_xpos2.y, _ypos0147);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0155);
|
|
_TMP10 = _TMP17.xyz;
|
|
_c0159 = vec2(_xpos2.z, _ypos0147);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0159);
|
|
_TMP11 = _TMP17.xyz;
|
|
_c0163 = vec2(_xpos2.w, _ypos0147);
|
|
_TMP17 = COMPAT_TEXTURE(Texture, _c0163);
|
|
_r0165 = _linetaps1.x*_TMP9;
|
|
_r0165 = _r0165 + _linetaps1.y*_TMP10;
|
|
_r0165 = _r0165 + _linetaps1.z*_TMP11;
|
|
_r0165 = _r0165 + _linetaps1.w*_TMP17.xyz;
|
|
_r0167 = _columntaps.x*_r0105;
|
|
_r0167 = _r0167 + _columntaps.y*_r0125;
|
|
_r0167 = _r0167 + _columntaps.z*_r0145;
|
|
_r0167 = _r0167 + _columntaps.w*_r0165;
|
|
_OUT._color = vec4(_r0167.x, _r0167.y, _r0167.z, 1.00000000E+00);
|
|
FragColor = _OUT._color;
|
|
return;
|
|
}
|
|
#endif
|