struct VS_OUTPUT
{
    float4 Position         : POSITION;   // vertex position
    float2 TexCoord         : TEXCOORD0;  // vertex interpolation value
};

struct PS_OUTPUT
{
    float4 Color    : COLOR0;
};

sampler Sampler = sampler_state
{ 
    MinFilter = POINT; //these do nothing
    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, Input.TexCoord.y + (Index - 10) * TextelScale)).xy * Coefficients[Index];
    }

    Output.Color = float4(Value.x, Value.y, 0.0, 0.0);
    
    return Output;
}