texture texture0;
float2 texelSize;
float offset;

sampler Sampler0 = sampler_state
{
    Texture = (texture0);
    AddressU = Clamp;
    AddressV = Clamp;
};

float4 PixelShader_Kawase(float2 uv : TEXCOORD0) : COLOR0
{
    float2 o = texelSize * offset;

    float4 c = tex2D(Sampler0, uv) * 0.30;

    c += tex2D(Sampler0, uv + float2( o.x,  o.y)) * 0.175;
    c += tex2D(Sampler0, uv + float2(-o.x,  o.y)) * 0.175;
    c += tex2D(Sampler0, uv + float2( o.x, -o.y)) * 0.175;
    c += tex2D(Sampler0, uv + float2(-o.x, -o.y)) * 0.175;

    return c;
}

technique Kawase
{
    pass P0
    {
        PixelShader = compile ps_2_0 PixelShader_Kawase();
    }
}
