struct VS_OUTPUT
{
float4 Position : POSITION; float2 TexCoord : TEXCOORD0; };
struct PS_OUTPUT
{
float4 Color : COLOR0;
};
sampler Sampler = sampler_state
{
MinFilter = POINT; MagFilter = POINT;
};
PS_OUTPUT PShaderEntry( VS_OUTPUT Input )
{
PS_OUTPUT Output;
float TextelScale = 1.0 / 512.0;
float2 Value = float2(0.0, 0.0);
float Coefficients[21] =
{0.000272337, 0.00089296, 0.002583865, 0.00659813, 0.014869116,
0.029570767, 0.051898313, 0.080381679, 0.109868729, 0.132526984,
0.14107424,
0.132526984, 0.109868729, 0.080381679, 0.051898313, 0.029570767,
0.014869116, 0.00659813, 0.002583865, 0.00089296, 0.000272337};
for(int Index = 0; Index < 21; Index++)
{
Value += tex2D(Sampler, float2(Input.TexCoord.x + (Index - 10) * TextelScale, Input.TexCoord.y)).xy * Coefficients[Index];
}
Output.Color = float4(Value.x, Value.y, 0.0, 0.0);
return Output;
}