#include "Post.fxh"


#define SAMPLE_COUNT 15

texture2D tex;
sampler2D samTex = sampler_state
{
    Texture = tex;
    MinFilter = LINEAR;
    MagFilter = LINEAR;    
    MipFilter = NONE;
	
	AddressU = CLAMP;
	AddressV = CLAMP;
};

float2 SampleOffsets[SAMPLE_COUNT];
float SampleWeights[SAMPLE_COUNT];

struct PSInput
{
	float2 TexCoord : TEXCOORD0;
};

struct PSOutput
{
    float4 Color : COLOR;
};

float4 Blur15Main(PSInput ip) : COLOR
{
	float color = 0;

	for (int i=0;i<SAMPLE_COUNT;i++)
		color += tex2D(samTex, ip.TexCoord + SampleOffsets[i]*2).a*SampleWeights[i];

	return float4(0.4f,0.4f,0.4f,color);
}


technique Blur15
{
	pass p0
	{
		VertexShader = compile vs_3_0 PostQuad();
		PixelShader = compile ps_3_0 Blur15Main();
	}
}