// This shader really blurs & whacks things over

struct VertOut
{
	float4 pos : POSITION;
	float4 col : COLOR0;
	float2 tc0 : TEXCOORD0;
};

struct FragOut
{
	float4 col : COLOR;
};

FragOut main(VertOut vin,
	uniform sampler2D tex0 : TEXUNIT0
      )
{
  FragOut fout;
  //float2 PixelOffset   = float2( 0.001953195, 0.00260416666 );
  //float2 BlurOffset    = float2( 0.001953195, 0 );
  float2 BlurOffset    = float2( 0.002953195, 0 );
  float PixelWeight[8] = { 0.2537, 0.2185, 0.0821, 0.0461, 0.0262, 0.0162, 0.0102, 0.0052 };

  float4 colorT = tex2D(tex0,vin.tc0);

  float4 color = 0; //tex2D(tex0,vin.tc0);

  // Sample pixels on either side
  for( int i = 0; i < 8; ++i )
  {
    color += tex2D(tex0, vin.tc0 + ( BlurOffset * i ) ) * PixelWeight[i];
    color += tex2D(tex0, vin.tc0 - ( BlurOffset * i ) ) * PixelWeight[i];
  }

  if(color.g>0.5)
  {
    color*=color;
  }

  fout.col=color;
  //float4 col=(1,0,1,1);

  return fout;
} 
