// 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;
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 _r0013;
COMPAT_ATTRIBUTE vec4 VertexCoord;
COMPAT_ATTRIBUTE vec4 COLOR;
COMPAT_VARYING vec4 COL0;
COMPAT_ATTRIBUTE vec4 TexCoord;
COMPAT_VARYING vec4 TEX0;
 
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;
    vec2 _oTex;
    _r0013 = VertexCoord.x*MVPMatrix[0];
    _r0013 = _r0013 + VertexCoord.y*MVPMatrix[1];
    _r0013 = _r0013 + VertexCoord.z*MVPMatrix[2];
    _r0013 = _r0013 + VertexCoord.w*MVPMatrix[3];
    _oPosition1 = _r0013;
    _oColor = COLOR;
    _oTex = TexCoord.xy;
    gl_Position = _r0013;
    COL0 = COLOR;
    TEX0.xy = TexCoord.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;
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;
float _TMP7;
float _TMP6;
float _TMP8;
input_dummy _IN1;
uniform sampler2D Texture;
float _TMP20;
vec2 _diff0021;
float _dist0021;
float _TMP30;
vec2 _diff0031;
float _dist0031;
float _TMP40;
vec2 _diff0041;
float _dist0041;
float _TMP50;
vec2 _diff0051;
float _dist0051;
float _TMP60;
vec2 _diff0061;
float _dist0061;
float _TMP70;
vec2 _diff0071;
float _dist0071;
float _TMP80;
vec2 _diff0081;
float _dist0081;
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 _output_dummy;
    vec2 _scale;
    float _res;
    _output_dummy = COMPAT_TEXTURE(Texture, TEX0.xy);
    _scale = (TEX0.xy*TextureSize)/InputSize;
    _diff0021 = _scale - vec2( 6.00000024E-01, 6.99999988E-01);
    _TMP6 = dot(_diff0021, _diff0021);
    _TMP8 = inversesqrt(_TMP6);
    _TMP7 = 1.00000000E+00/_TMP8;
    _dist0021 = 3.00000000E+02*_TMP7;
    _dist0021 = _dist0021 - 1.50000006E-01*float(FrameCount);
    _TMP20 = sin(_dist0021);
    _diff0031 = _scale - vec2( 8.99999976E-01, 8.99999976E-01);
    _TMP6 = dot(_diff0031, _diff0031);
    _TMP8 = inversesqrt(_TMP6);
    _TMP7 = 1.00000000E+00/_TMP8;
    _dist0031 = 3.00000000E+02*_TMP7;
    _dist0031 = _dist0031 - 1.50000006E-01*float(FrameCount);
    _TMP30 = sin(_dist0031);
    _res = _TMP20 + _TMP30;
    _diff0041 = _scale - vec2( -6.00000024E-01, 3.00000012E-01);
    _TMP6 = dot(_diff0041, _diff0041);
    _TMP8 = inversesqrt(_TMP6);
    _TMP7 = 1.00000000E+00/_TMP8;
    _dist0041 = 3.00000000E+02*_TMP7;
    _dist0041 = _dist0041 - 1.50000006E-01*float(FrameCount);
    _TMP40 = sin(_dist0041);
    _res = _res + _TMP40;
    _diff0051 = _scale - vec2( 1.00000001E-01, 4.00000006E-01);
    _TMP6 = dot(_diff0051, _diff0051);
    _TMP8 = inversesqrt(_TMP6);
    _TMP7 = 1.00000000E+00/_TMP8;
    _dist0051 = 3.00000000E+02*_TMP7;
    _dist0051 = _dist0051 - 1.50000006E-01*float(FrameCount);
    _TMP50 = sin(_dist0051);
    _res = _res + _TMP50;
    _diff0061 = _scale - vec2( 1.00000001E-01, 4.00000006E-01);
    _TMP6 = dot(_diff0061, _diff0061);
    _TMP8 = inversesqrt(_TMP6);
    _TMP7 = 1.00000000E+00/_TMP8;
    _dist0061 = 3.00000000E+02*_TMP7;
    _dist0061 = _dist0061 - 1.50000006E-01*float(FrameCount);
    _TMP60 = sin(_dist0061);
    _res = _res + _TMP60;
    _diff0071 = _scale - vec2( 5.00000000E-01, 5.00000000E-01);
    _TMP6 = dot(_diff0071, _diff0071);
    _TMP8 = inversesqrt(_TMP6);
    _TMP7 = 1.00000000E+00/_TMP8;
    _dist0071 = 3.00000000E+02*_TMP7;
    _dist0071 = _dist0071 - 1.50000006E-01*float(FrameCount);
    _TMP70 = sin(_dist0071);
    _res = _res + _TMP70;
    _diff0081 = _scale - vec2( -1.00000000E+00, 1.00000000E+00);
    _TMP6 = dot(_diff0081, _diff0081);
    _TMP8 = inversesqrt(_TMP6);
    _TMP7 = 1.00000000E+00/_TMP8;
    _dist0081 = 3.00000000E+02*_TMP7;
    _dist0081 = _dist0081 - 1.50000006E-01*float(FrameCount);
    _TMP80 = sin(_dist0081);
    _res = _res + _TMP80;
    _ret_0 = _output_dummy*(8.99999976E-01 + 1.20000001E-02*_res);
    FragColor = _ret_0;
    return;
} 
#endif
