// * xy-blur

struct fragment
{
	float4 position  : POSITION;
	float4 color0    : COLOR0;
	float2 texcoord0 : TEXCOORD0;
};

void main( in fragment IN,
					 in uniform sampler2D texture,
					 in uniform float xoff,
					 in uniform float yoff,			
					 in uniform float alpha,
					 out float4 OUT : COLOR0 )
{
	const float2 DX = float2(xoff, 0.0f);
	const float2 DY = float2(0.0f, yoff);

	float4 col = float4(0,0,0,0);
	
	col += tex2D(texture, IN.texcoord0 );
	col += tex2D(texture, IN.texcoord0 + DX);
	col += tex2D(texture, IN.texcoord0 - DX);
	col += tex2D(texture, IN.texcoord0 + DY);
	col += tex2D(texture, IN.texcoord0 - DY);
	
	OUT = col/5.0f *alpha;	
}

