// 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 _blur_dxdy;
COMPAT_VARYING     vec2 _tex_uv1;
COMPAT_VARYING     vec4 _position1;
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;
};
struct out_vertex {
    vec4 _position1;
    vec2 _tex_uv1;
    vec2 _blur_dxdy;
};
out_vertex _ret_0;
input_dummy _IN1;
vec4 _r0006;
COMPAT_ATTRIBUTE vec4 VertexCoord;
COMPAT_ATTRIBUTE vec4 TexCoord;
COMPAT_VARYING vec4 TEX0;
COMPAT_VARYING vec4 TEX1;
 
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()
{
    out_vertex _OUT;
    vec2 _dxdy_scale;
    vec2 _dxdy;
    _r0006 = VertexCoord.x*MVPMatrix[0];
    _r0006 = _r0006 + VertexCoord.y*MVPMatrix[1];
    _r0006 = _r0006 + VertexCoord.z*MVPMatrix[2];
    _r0006 = _r0006 + VertexCoord.w*MVPMatrix[3];
    _dxdy_scale = InputSize/OutputSize;
    _dxdy = _dxdy_scale/TextureSize;
    _OUT._blur_dxdy = vec2(_dxdy.x, 0.00000000E+00);
    _ret_0._position1 = _r0006;
    _ret_0._tex_uv1 = TexCoord.xy;
    _ret_0._blur_dxdy = _OUT._blur_dxdy;
    gl_Position = _r0006;
    TEX0.xy = TexCoord.xy;
    TEX1.xy = _OUT._blur_dxdy;
    return;
    TEX0.xy = _ret_0._tex_uv1;
    TEX1.xy = _ret_0._blur_dxdy;
} 
#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 _blur_dxdy;
COMPAT_VARYING     vec2 _tex_uv1;
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;
};
struct out_vertex {
    vec2 _tex_uv1;
    vec2 _blur_dxdy;
};
vec4 _ret_0;
vec3 _TMP1;
float _TMP15;
float _TMP14;
float _TMP13;
vec4 _TMP16;
vec3 _TMP18;
uniform sampler2D Texture;
vec3 _TMP25;
float _weight_sum_inv0028;
vec3 _sum0028;
float _TMP29;
float _TMP33;
float _TMP37;
float _TMP41;
float _TMP45;
vec4 _TMP49;
vec2 _tex_coords0050;
vec4 _TMP67;
vec2 _tex_coords0068;
vec4 _TMP85;
vec2 _tex_coords0086;
vec4 _TMP103;
vec2 _tex_coords0104;
vec4 _TMP121;
vec2 _tex_coords0122;
vec4 _TMP139;
vec4 _TMP157;
vec2 _tex_coords0158;
vec4 _TMP175;
vec2 _tex_coords0176;
vec4 _TMP193;
vec2 _tex_coords0194;
vec4 _TMP211;
vec2 _tex_coords0212;
vec4 _TMP229;
vec2 _tex_coords0230;
vec4 _color0248;
COMPAT_VARYING vec4 TEX0;
COMPAT_VARYING vec4 TEX1;
 
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
void main()
{
    _TMP29 = pow(2.71828198E+00, -1.07180931E-01);
    _TMP33 = pow(2.71828198E+00, -4.28723723E-01);
    _TMP37 = pow(2.71828198E+00, -9.64628398E-01);
    _TMP41 = pow(2.71828198E+00, -1.71489489E+00);
    _TMP45 = pow(2.71828198E+00, -2.67952323E+00);
    _weight_sum_inv0028 = 1.00000000E+00/(1.00000000E+00 + 2.00000000E+00*(_TMP29 + _TMP33 + _TMP37 + _TMP41 + _TMP45));
    _tex_coords0050 = TEX0.xy - 5.00000000E+00*TEX1.xy;
    _TMP16 = COMPAT_TEXTURE(Texture, _tex_coords0050);
    _TMP13 = pow(_TMP16.x, 2.20000005E+00);
    _TMP14 = pow(_TMP16.y, 2.20000005E+00);
    _TMP15 = pow(_TMP16.z, 2.20000005E+00);
    _TMP18 = vec3(_TMP13, _TMP14, _TMP15);
    _TMP49 = vec4(_TMP18.x, _TMP18.y, _TMP18.z, _TMP16.w);
    _sum0028 = _TMP45*_TMP49.xyz;
    _tex_coords0068 = TEX0.xy - 4.00000000E+00*TEX1.xy;
    _TMP16 = COMPAT_TEXTURE(Texture, _tex_coords0068);
    _TMP13 = pow(_TMP16.x, 2.20000005E+00);
    _TMP14 = pow(_TMP16.y, 2.20000005E+00);
    _TMP15 = pow(_TMP16.z, 2.20000005E+00);
    _TMP18 = vec3(_TMP13, _TMP14, _TMP15);
    _TMP67 = vec4(_TMP18.x, _TMP18.y, _TMP18.z, _TMP16.w);
    _sum0028 = _sum0028 + _TMP41*_TMP67.xyz;
    _tex_coords0086 = TEX0.xy - 3.00000000E+00*TEX1.xy;
    _TMP16 = COMPAT_TEXTURE(Texture, _tex_coords0086);
    _TMP13 = pow(_TMP16.x, 2.20000005E+00);
    _TMP14 = pow(_TMP16.y, 2.20000005E+00);
    _TMP15 = pow(_TMP16.z, 2.20000005E+00);
    _TMP18 = vec3(_TMP13, _TMP14, _TMP15);
    _TMP85 = vec4(_TMP18.x, _TMP18.y, _TMP18.z, _TMP16.w);
    _sum0028 = _sum0028 + _TMP37*_TMP85.xyz;
    _tex_coords0104 = TEX0.xy - 2.00000000E+00*TEX1.xy;
    _TMP16 = COMPAT_TEXTURE(Texture, _tex_coords0104);
    _TMP13 = pow(_TMP16.x, 2.20000005E+00);
    _TMP14 = pow(_TMP16.y, 2.20000005E+00);
    _TMP15 = pow(_TMP16.z, 2.20000005E+00);
    _TMP18 = vec3(_TMP13, _TMP14, _TMP15);
    _TMP103 = vec4(_TMP18.x, _TMP18.y, _TMP18.z, _TMP16.w);
    _sum0028 = _sum0028 + _TMP33*_TMP103.xyz;
    _tex_coords0122 = TEX0.xy - TEX1.xy;
    _TMP16 = COMPAT_TEXTURE(Texture, _tex_coords0122);
    _TMP13 = pow(_TMP16.x, 2.20000005E+00);
    _TMP14 = pow(_TMP16.y, 2.20000005E+00);
    _TMP15 = pow(_TMP16.z, 2.20000005E+00);
    _TMP18 = vec3(_TMP13, _TMP14, _TMP15);
    _TMP121 = vec4(_TMP18.x, _TMP18.y, _TMP18.z, _TMP16.w);
    _sum0028 = _sum0028 + _TMP29*_TMP121.xyz;
    _TMP16 = COMPAT_TEXTURE(Texture, TEX0.xy);
    _TMP13 = pow(_TMP16.x, 2.20000005E+00);
    _TMP14 = pow(_TMP16.y, 2.20000005E+00);
    _TMP15 = pow(_TMP16.z, 2.20000005E+00);
    _TMP18 = vec3(_TMP13, _TMP14, _TMP15);
    _TMP139 = vec4(_TMP18.x, _TMP18.y, _TMP18.z, _TMP16.w);
    _sum0028 = _sum0028 + _TMP139.xyz;
    _tex_coords0158 = TEX0.xy + TEX1.xy;
    _TMP16 = COMPAT_TEXTURE(Texture, _tex_coords0158);
    _TMP13 = pow(_TMP16.x, 2.20000005E+00);
    _TMP14 = pow(_TMP16.y, 2.20000005E+00);
    _TMP15 = pow(_TMP16.z, 2.20000005E+00);
    _TMP18 = vec3(_TMP13, _TMP14, _TMP15);
    _TMP157 = vec4(_TMP18.x, _TMP18.y, _TMP18.z, _TMP16.w);
    _sum0028 = _sum0028 + _TMP29*_TMP157.xyz;
    _tex_coords0176 = TEX0.xy + 2.00000000E+00*TEX1.xy;
    _TMP16 = COMPAT_TEXTURE(Texture, _tex_coords0176);
    _TMP13 = pow(_TMP16.x, 2.20000005E+00);
    _TMP14 = pow(_TMP16.y, 2.20000005E+00);
    _TMP15 = pow(_TMP16.z, 2.20000005E+00);
    _TMP18 = vec3(_TMP13, _TMP14, _TMP15);
    _TMP175 = vec4(_TMP18.x, _TMP18.y, _TMP18.z, _TMP16.w);
    _sum0028 = _sum0028 + _TMP33*_TMP175.xyz;
    _tex_coords0194 = TEX0.xy + 3.00000000E+00*TEX1.xy;
    _TMP16 = COMPAT_TEXTURE(Texture, _tex_coords0194);
    _TMP13 = pow(_TMP16.x, 2.20000005E+00);
    _TMP14 = pow(_TMP16.y, 2.20000005E+00);
    _TMP15 = pow(_TMP16.z, 2.20000005E+00);
    _TMP18 = vec3(_TMP13, _TMP14, _TMP15);
    _TMP193 = vec4(_TMP18.x, _TMP18.y, _TMP18.z, _TMP16.w);
    _sum0028 = _sum0028 + _TMP37*_TMP193.xyz;
    _tex_coords0212 = TEX0.xy + 4.00000000E+00*TEX1.xy;
    _TMP16 = COMPAT_TEXTURE(Texture, _tex_coords0212);
    _TMP13 = pow(_TMP16.x, 2.20000005E+00);
    _TMP14 = pow(_TMP16.y, 2.20000005E+00);
    _TMP15 = pow(_TMP16.z, 2.20000005E+00);
    _TMP18 = vec3(_TMP13, _TMP14, _TMP15);
    _TMP211 = vec4(_TMP18.x, _TMP18.y, _TMP18.z, _TMP16.w);
    _sum0028 = _sum0028 + _TMP41*_TMP211.xyz;
    _tex_coords0230 = TEX0.xy + 5.00000000E+00*TEX1.xy;
    _TMP16 = COMPAT_TEXTURE(Texture, _tex_coords0230);
    _TMP13 = pow(_TMP16.x, 2.20000005E+00);
    _TMP14 = pow(_TMP16.y, 2.20000005E+00);
    _TMP15 = pow(_TMP16.z, 2.20000005E+00);
    _TMP18 = vec3(_TMP13, _TMP14, _TMP15);
    _TMP229 = vec4(_TMP18.x, _TMP18.y, _TMP18.z, _TMP16.w);
    _sum0028 = _sum0028 + _TMP45*_TMP229.xyz;
    _TMP25 = _sum0028*_weight_sum_inv0028;
    _color0248 = vec4(_TMP25.x, _TMP25.y, _TMP25.z, 1.00000000E+00);
    _TMP13 = pow(_color0248.x, 4.54545438E-01);
    _TMP14 = pow(_color0248.y, 4.54545438E-01);
    _TMP15 = pow(_color0248.z, 4.54545438E-01);
    _TMP1 = vec3(_TMP13, _TMP14, _TMP15);
    _ret_0 = vec4(_TMP1.x, _TMP1.y, _TMP1.z, _color0248.w);
    FragColor = _ret_0;
    return;
} 
#endif
