// 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
