// 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;
    _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;
    _OUT._blur_dxdy = _dxdy_scale/TextureSize;
    _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 _TMP35;
float _TMP9;
float _TMP8;
float _TMP7;
float _TMP6;
float _TMP5;
float _TMP4;
float _TMP3;
float _TMP2;
float _TMP1;
float _TMP0;
uniform sampler2D Texture;
vec3 _TMP40;
float _texel1to2ratio0043;
float _texel3to4ratio0043;
vec2 _sample1R_texel_offset0043;
vec2 _sample2R_texel_offset0043;
vec2 _sample3d_texel_offset0043;
vec2 _sample4d_texel_offset0043;
vec2 _sample5d_texel_offset0043;
vec2 _sample6d_texel_offset0043;
float _w10043;
float _w20043;
float _w30043;
float _w40043;
float _w60043;
float _weight_sum_inv0043;
vec2 _dxdy_mirror_x0043;
vec2 _dxdy_mirror_y0043;
vec2 _dxdy_mirror_xy0043;
vec3 _sample0C0043;
vec3 _sample1R0043;
vec3 _sample1D0043;
vec3 _sample1L0043;
vec3 _sample1U0043;
vec3 _sample2R0043;
vec3 _sample2D0043;
vec3 _sample2L0043;
vec3 _sample2U0043;
vec3 _sample3d0043;
vec3 _sample3c0043;
vec3 _sample3b0043;
vec3 _sample3a0043;
vec3 _sample4d0043;
vec3 _sample4c0043;
vec3 _sample4b0043;
vec3 _sample4a0043;
vec3 _sample5d0043;
vec3 _sample5c0043;
vec3 _sample5b0043;
vec3 _sample5a0043;
vec3 _sample6d0043;
vec3 _sample6c0043;
vec3 _sample6b0043;
vec3 _sum0043;
float _TMP44;
float _TMP48;
float _TMP52;
float _TMP56;
float _TMP62;
float _x0063;
float _TMP68;
float _x0069;
float _TMP74;
float _x0075;
float _TMP80;
float _x0081;
float _TMP86;
float _x0087;
float _TMP92;
float _x0093;
float _TMP98;
float _x0099;
float _TMP104;
float _x0105;
float _TMP110;
float _x0111;
float _TMP116;
float _x0117;
vec2 _tex_coords0127;
vec2 _tex_coords0133;
vec2 _tex_coords0139;
vec2 _tex_coords0145;
vec2 _tex_coords0151;
vec2 _tex_coords0157;
vec2 _tex_coords0163;
vec2 _tex_coords0169;
vec2 _tex_coords0175;
vec2 _tex_coords0181;
vec2 _tex_coords0187;
vec2 _tex_coords0193;
vec2 _tex_coords0199;
vec2 _tex_coords0205;
vec2 _tex_coords0211;
vec2 _tex_coords0217;
vec2 _tex_coords0223;
vec2 _tex_coords0229;
vec2 _tex_coords0235;
vec2 _tex_coords0241;
vec2 _tex_coords0247;
vec2 _tex_coords0253;
vec2 _tex_coords0259;
vec2 _tex_coords0265;
vec4 _color0271;
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()
{
    _TMP44 = pow(2.71828198E+00, -1.62647530E-01);
    _TMP48 = pow(2.71828198E+00, -6.50590122E-01);
    _TMP52 = pow(2.71828198E+00, -1.46382773E+00);
    _TMP56 = pow(2.71828198E+00, -2.60236049E+00);
    _texel1to2ratio0043 = _TMP48/(_TMP44 + _TMP48);
    _texel3to4ratio0043 = _TMP56/(_TMP52 + _TMP56);
    _sample1R_texel_offset0043 = vec2( 1.00000000E+00, 0.00000000E+00) + vec2(_texel1to2ratio0043, 0.00000000E+00);
    _sample2R_texel_offset0043 = vec2( 3.00000000E+00, 0.00000000E+00) + vec2(_texel3to4ratio0043, 0.00000000E+00);
    _sample3d_texel_offset0043 = vec2( 1.00000000E+00, 1.00000000E+00) + vec2(_texel1to2ratio0043, _texel1to2ratio0043);
    _sample4d_texel_offset0043 = vec2( 3.00000000E+00, 1.00000000E+00) + vec2(_texel3to4ratio0043, _texel1to2ratio0043);
    _sample5d_texel_offset0043 = vec2( 1.00000000E+00, 3.00000000E+00) + vec2(_texel1to2ratio0043, _texel3to4ratio0043);
    _sample6d_texel_offset0043 = vec2( 3.00000000E+00, 3.00000000E+00) + vec2(_texel3to4ratio0043, _texel3to4ratio0043);
    _TMP0 = dot(vec2( 1.00000000E+00, 1.00000000E+00), vec2( 1.00000000E+00, 1.00000000E+00));
    _x0063 = -_TMP0*1.62647530E-01;
    _TMP62 = pow(2.71828198E+00, _x0063);
    _TMP1 = dot(vec2( 2.00000000E+00, 1.00000000E+00), vec2( 2.00000000E+00, 1.00000000E+00));
    _x0069 = -_TMP1*1.62647530E-01;
    _TMP68 = pow(2.71828198E+00, _x0069);
    _TMP2 = dot(vec2( 2.00000000E+00, 2.00000000E+00), vec2( 2.00000000E+00, 2.00000000E+00));
    _x0075 = -_TMP2*1.62647530E-01;
    _TMP74 = pow(2.71828198E+00, _x0075);
    _TMP3 = dot(vec2( 3.00000000E+00, 1.00000000E+00), vec2( 3.00000000E+00, 1.00000000E+00));
    _x0081 = -_TMP3*1.62647530E-01;
    _TMP80 = pow(2.71828198E+00, _x0081);
    _TMP4 = dot(vec2( 4.00000000E+00, 1.00000000E+00), vec2( 4.00000000E+00, 1.00000000E+00));
    _x0087 = -_TMP4*1.62647530E-01;
    _TMP86 = pow(2.71828198E+00, _x0087);
    _TMP5 = dot(vec2( 3.00000000E+00, 2.00000000E+00), vec2( 3.00000000E+00, 2.00000000E+00));
    _x0093 = -_TMP5*1.62647530E-01;
    _TMP92 = pow(2.71828198E+00, _x0093);
    _TMP6 = dot(vec2( 4.00000000E+00, 2.00000000E+00), vec2( 4.00000000E+00, 2.00000000E+00));
    _x0099 = -_TMP6*1.62647530E-01;
    _TMP98 = pow(2.71828198E+00, _x0099);
    _TMP7 = dot(vec2( 3.00000000E+00, 3.00000000E+00), vec2( 3.00000000E+00, 3.00000000E+00));
    _x0105 = -_TMP7*1.62647530E-01;
    _TMP104 = pow(2.71828198E+00, _x0105);
    _TMP8 = dot(vec2( 4.00000000E+00, 3.00000000E+00), vec2( 4.00000000E+00, 3.00000000E+00));
    _x0111 = -_TMP8*1.62647530E-01;
    _TMP110 = pow(2.71828198E+00, _x0111);
    _TMP9 = dot(vec2( 4.00000000E+00, 4.00000000E+00), vec2( 4.00000000E+00, 4.00000000E+00));
    _x0117 = -_TMP9*1.62647530E-01;
    _TMP116 = pow(2.71828198E+00, _x0117);
    _w10043 = _TMP44 + _TMP48;
    _w20043 = _TMP52 + _TMP56;
    _w30043 = _TMP62 + 2.00000000E+00*_TMP68 + _TMP74;
    _w40043 = _TMP80 + _TMP86 + _TMP92 + _TMP98;
    _w60043 = _TMP104 + 2.00000000E+00*_TMP110 + _TMP116;
    _weight_sum_inv0043 = 1.00000000E+00/(1.00000000E+00 + 4.00000000E+00*(_w10043 + _w20043 + _w30043 + _w40043 + _w40043 + _w60043));
    _dxdy_mirror_x0043 = TEX1.xy*vec2( -1.00000000E+00, 1.00000000E+00);
    _dxdy_mirror_y0043 = TEX1.xy*vec2( 1.00000000E+00, -1.00000000E+00);
    _dxdy_mirror_xy0043 = -TEX1.xy;
    _TMP35 = COMPAT_TEXTURE(Texture, TEX0.xy);
    _sample0C0043 = _TMP35.xyz;
    _tex_coords0127 = TEX0.xy + TEX1.xy*_sample1R_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0127);
    _sample1R0043 = _TMP35.xyz;
    _tex_coords0133 = TEX0.xy + TEX1.xy*_sample1R_texel_offset0043.yx;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0133);
    _sample1D0043 = _TMP35.xyz;
    _tex_coords0139 = TEX0.xy - TEX1.xy*_sample1R_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0139);
    _sample1L0043 = _TMP35.xyz;
    _tex_coords0145 = TEX0.xy - TEX1.xy*_sample1R_texel_offset0043.yx;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0145);
    _sample1U0043 = _TMP35.xyz;
    _tex_coords0151 = TEX0.xy + TEX1.xy*_sample2R_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0151);
    _sample2R0043 = _TMP35.xyz;
    _tex_coords0157 = TEX0.xy + TEX1.xy*_sample2R_texel_offset0043.yx;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0157);
    _sample2D0043 = _TMP35.xyz;
    _tex_coords0163 = TEX0.xy - TEX1.xy*_sample2R_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0163);
    _sample2L0043 = _TMP35.xyz;
    _tex_coords0169 = TEX0.xy - TEX1.xy*_sample2R_texel_offset0043.yx;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0169);
    _sample2U0043 = _TMP35.xyz;
    _tex_coords0175 = TEX0.xy + TEX1.xy*_sample3d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0175);
    _sample3d0043 = _TMP35.xyz;
    _tex_coords0181 = TEX0.xy + _dxdy_mirror_x0043*_sample3d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0181);
    _sample3c0043 = _TMP35.xyz;
    _tex_coords0187 = TEX0.xy + _dxdy_mirror_y0043*_sample3d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0187);
    _sample3b0043 = _TMP35.xyz;
    _tex_coords0193 = TEX0.xy + _dxdy_mirror_xy0043*_sample3d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0193);
    _sample3a0043 = _TMP35.xyz;
    _tex_coords0199 = TEX0.xy + TEX1.xy*_sample4d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0199);
    _sample4d0043 = _TMP35.xyz;
    _tex_coords0205 = TEX0.xy + _dxdy_mirror_x0043*_sample4d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0205);
    _sample4c0043 = _TMP35.xyz;
    _tex_coords0211 = TEX0.xy + _dxdy_mirror_y0043*_sample4d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0211);
    _sample4b0043 = _TMP35.xyz;
    _tex_coords0217 = TEX0.xy + _dxdy_mirror_xy0043*_sample4d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0217);
    _sample4a0043 = _TMP35.xyz;
    _tex_coords0223 = TEX0.xy + TEX1.xy*_sample5d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0223);
    _sample5d0043 = _TMP35.xyz;
    _tex_coords0229 = TEX0.xy + _dxdy_mirror_x0043*_sample5d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0229);
    _sample5c0043 = _TMP35.xyz;
    _tex_coords0235 = TEX0.xy + _dxdy_mirror_y0043*_sample5d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0235);
    _sample5b0043 = _TMP35.xyz;
    _tex_coords0241 = TEX0.xy + _dxdy_mirror_xy0043*_sample5d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0241);
    _sample5a0043 = _TMP35.xyz;
    _tex_coords0247 = TEX0.xy + TEX1.xy*_sample6d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0247);
    _sample6d0043 = _TMP35.xyz;
    _tex_coords0253 = TEX0.xy + _dxdy_mirror_x0043*_sample6d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0253);
    _sample6c0043 = _TMP35.xyz;
    _tex_coords0259 = TEX0.xy + _dxdy_mirror_y0043*_sample6d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0259);
    _sample6b0043 = _TMP35.xyz;
    _tex_coords0265 = TEX0.xy + _dxdy_mirror_xy0043*_sample6d_texel_offset0043;
    _TMP35 = COMPAT_TEXTURE(Texture, _tex_coords0265);
    _sum0043 = _sample0C0043 + _w10043*(_sample1R0043 + _sample1D0043 + _sample1L0043 + _sample1U0043);
    _sum0043 = _sum0043 + _w20043*(_sample2R0043 + _sample2D0043 + _sample2L0043 + _sample2U0043);
    _sum0043 = _sum0043 + _w30043*(_sample3d0043 + _sample3c0043 + _sample3b0043 + _sample3a0043);
    _sum0043 = _sum0043 + _w40043*(_sample4d0043 + _sample4c0043 + _sample4b0043 + _sample4a0043);
    _sum0043 = _sum0043 + _w40043*(_sample5d0043 + _sample5c0043 + _sample5b0043 + _sample5a0043);
    _sum0043 = _sum0043 + _w60043*(_sample6d0043 + _sample6c0043 + _sample6b0043 + _TMP35.xyz);
    _TMP40 = _sum0043*_weight_sum_inv0043;
    _color0271 = vec4(_TMP40.x, _TMP40.y, _TMP40.z, 1.00000000E+00);
    FragColor = _color0271;
    return;
} 
#endif
