#pragma parameter blur_soft_y "Blur Soft Y" 10.0 1.0 20.0 1.0
#ifdef PARAMETER_UNIFORM
uniform float blur_soft_y;
#else
#define blur_soft_y 10.0
#endif

struct input
{
   float2 video_size;
   float2 texture_size;
   float2 output_size;
   float frame_count;
   float frame_direction;
   float frame_rotation;
};

void main_vertex
(
   float4 position : POSITION,
   out float4 oPosition : POSITION,
   uniform float4x4 modelViewProj,

   float4 color : COLOR,
   out float4 oColor : COLOR,

   float2 tex : TEXCOORD,
   out float2 oTex : TEXCOORD,

   uniform input IN
)
{
   oPosition = mul(modelViewProj, position);
   oColor = color;
   oTex = tex;
}

float4 main_fragment (
   float2 tex : TEXCOORD0,
   uniform sampler2D s0 : TEXUNIT0,
   uniform input IN) : COLOR
{

 float4 big = float4(tex2D(s0, tex));
	big += pow(tex2D(s0, float2(tex.x, tex.y + 1.0 * 0.0001 * blur_soft_y)), 2.2);
	big += pow(tex2D(s0, float2(tex.x, tex.y - 1.0 * 0.0001 * blur_soft_y)), 2.2);
	big += pow(tex2D(s0, float2(tex.x, tex.y + 2.0 * 0.0001 * blur_soft_y)), 2.2);
	big += pow(tex2D(s0, float2(tex.x, tex.y - 2.0 * 0.0001 * blur_soft_y)), 2.2);
	big += pow(tex2D(s0, float2(tex.x, tex.y + 4.0 * 0.0001 * blur_soft_y)), 2.2);
	big += pow(tex2D(s0, float2(tex.x, tex.y - 4.0 * 0.0001 * blur_soft_y)), 2.2);
	big += pow(tex2D(s0, float2(tex.x, tex.y + 8.0 * 0.0001 * blur_soft_y)), 2.2);
	big += pow(tex2D(s0, float2(tex.x, tex.y - 8.0 * 0.0001 * blur_soft_y)), 2.2);
	big /= float4(9.0);
	big = pow(big, 1.0/2.2);

   return float4(big);
}
