// 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(0.00000000E+00, _dxdy.y);
    _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 _TMP10;
float _TMP9;
float _TMP8;
vec4 _TMP11;
vec3 _TMP13;
uniform sampler2D Texture;
vec3 _TMP20;
float _weight_sum_inv0023;
float _w010023;
float _w230023;
float _w450023;
float _w01_ratio0023;
float _w23_ratio0023;
float _w45_ratio0023;
vec3 _sum0023;
float _TMP24;
float _TMP28;
float _TMP32;
float _TMP36;
float _TMP40;
vec4 _TMP44;
vec2 _tex_coords0045;
vec4 _TMP62;
vec2 _tex_coords0063;
vec4 _TMP80;
vec2 _tex_coords0081;
vec4 _TMP98;
vec2 _tex_coords0099;
vec4 _TMP116;
vec2 _tex_coords0117;
vec4 _TMP134;
vec2 _tex_coords0135;
vec4 _color0153;
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()
{
    _TMP24 = pow(2.71828198E+00, -1.07180931E-01);
    _TMP28 = pow(2.71828198E+00, -4.28723723E-01);
    _TMP32 = pow(2.71828198E+00, -9.64628398E-01);
    _TMP36 = pow(2.71828198E+00, -1.71489489E+00);
    _TMP40 = pow(2.71828198E+00, -2.67952323E+00);
    _weight_sum_inv0023 = 1.00000000E+00/(1.00000000E+00 + 2.00000000E+00*(_TMP24 + _TMP28 + _TMP32 + _TMP36 + _TMP40));
    _w010023 = 5.00000000E-01 + _TMP24;
    _w230023 = _TMP28 + _TMP32;
    _w450023 = _TMP36 + _TMP40;
    _w01_ratio0023 = _TMP24/_w010023;
    _w23_ratio0023 = _TMP32/_w230023;
    _w45_ratio0023 = _TMP40/_w450023;
    _tex_coords0045 = TEX0.xy - (4.00000000E+00 + _w45_ratio0023)*TEX1.xy;
    _TMP11 = COMPAT_TEXTURE(Texture, _tex_coords0045);
    _TMP8 = pow(_TMP11.x, 2.20000005E+00);
    _TMP9 = pow(_TMP11.y, 2.20000005E+00);
    _TMP10 = pow(_TMP11.z, 2.20000005E+00);
    _TMP13 = vec3(_TMP8, _TMP9, _TMP10);
    _TMP44 = vec4(_TMP13.x, _TMP13.y, _TMP13.z, _TMP11.w);
    _sum0023 = _w450023*_TMP44.xyz;
    _tex_coords0063 = TEX0.xy - (2.00000000E+00 + _w23_ratio0023)*TEX1.xy;
    _TMP11 = COMPAT_TEXTURE(Texture, _tex_coords0063);
    _TMP8 = pow(_TMP11.x, 2.20000005E+00);
    _TMP9 = pow(_TMP11.y, 2.20000005E+00);
    _TMP10 = pow(_TMP11.z, 2.20000005E+00);
    _TMP13 = vec3(_TMP8, _TMP9, _TMP10);
    _TMP62 = vec4(_TMP13.x, _TMP13.y, _TMP13.z, _TMP11.w);
    _sum0023 = _sum0023 + _w230023*_TMP62.xyz;
    _tex_coords0081 = TEX0.xy - _w01_ratio0023*TEX1.xy;
    _TMP11 = COMPAT_TEXTURE(Texture, _tex_coords0081);
    _TMP8 = pow(_TMP11.x, 2.20000005E+00);
    _TMP9 = pow(_TMP11.y, 2.20000005E+00);
    _TMP10 = pow(_TMP11.z, 2.20000005E+00);
    _TMP13 = vec3(_TMP8, _TMP9, _TMP10);
    _TMP80 = vec4(_TMP13.x, _TMP13.y, _TMP13.z, _TMP11.w);
    _sum0023 = _sum0023 + _w010023*_TMP80.xyz;
    _tex_coords0099 = TEX0.xy + _w01_ratio0023*TEX1.xy;
    _TMP11 = COMPAT_TEXTURE(Texture, _tex_coords0099);
    _TMP8 = pow(_TMP11.x, 2.20000005E+00);
    _TMP9 = pow(_TMP11.y, 2.20000005E+00);
    _TMP10 = pow(_TMP11.z, 2.20000005E+00);
    _TMP13 = vec3(_TMP8, _TMP9, _TMP10);
    _TMP98 = vec4(_TMP13.x, _TMP13.y, _TMP13.z, _TMP11.w);
    _sum0023 = _sum0023 + _w010023*_TMP98.xyz;
    _tex_coords0117 = TEX0.xy + (2.00000000E+00 + _w23_ratio0023)*TEX1.xy;
    _TMP11 = COMPAT_TEXTURE(Texture, _tex_coords0117);
    _TMP8 = pow(_TMP11.x, 2.20000005E+00);
    _TMP9 = pow(_TMP11.y, 2.20000005E+00);
    _TMP10 = pow(_TMP11.z, 2.20000005E+00);
    _TMP13 = vec3(_TMP8, _TMP9, _TMP10);
    _TMP116 = vec4(_TMP13.x, _TMP13.y, _TMP13.z, _TMP11.w);
    _sum0023 = _sum0023 + _w230023*_TMP116.xyz;
    _tex_coords0135 = TEX0.xy + (4.00000000E+00 + _w45_ratio0023)*TEX1.xy;
    _TMP11 = COMPAT_TEXTURE(Texture, _tex_coords0135);
    _TMP8 = pow(_TMP11.x, 2.20000005E+00);
    _TMP9 = pow(_TMP11.y, 2.20000005E+00);
    _TMP10 = pow(_TMP11.z, 2.20000005E+00);
    _TMP13 = vec3(_TMP8, _TMP9, _TMP10);
    _TMP134 = vec4(_TMP13.x, _TMP13.y, _TMP13.z, _TMP11.w);
    _sum0023 = _sum0023 + _w450023*_TMP134.xyz;
    _TMP20 = _sum0023*_weight_sum_inv0023;
    _color0153 = vec4(_TMP20.x, _TMP20.y, _TMP20.z, 1.00000000E+00);
    _TMP8 = pow(_color0153.x, 4.54545438E-01);
    _TMP9 = pow(_color0153.y, 4.54545438E-01);
    _TMP10 = pow(_color0153.z, 4.54545438E-01);
    _TMP1 = vec3(_TMP8, _TMP9, _TMP10);
    _ret_0 = vec4(_TMP1.x, _TMP1.y, _TMP1.z, _color0153.w);
    FragColor = _ret_0;
    return;
} 
#endif
