sampler TextureSampler; 
 
struct VS_INPUT { 
    float4 Position : POSITION0; 
    float2 Texcoord : TEXCOORD0; 
};
 
VS_INPUT NullVertexShader(VS_INPUT Input) { 
    VS_INPUT Output;
    
    Output.Position = Input.Position; 
    Output.Texcoord = Input.Texcoord; 
 
    return Output; 
} 

half4 GaussianBlur(float2 UV, float2 Size)
{
 half4 tmp = tex2D(TextureSampler, UV.xy + float2(-Size.x, -Size.y)) * 0.0769;
       tmp+= tex2D(TextureSampler, UV.xy + float2(	     0, -Size.y)) * 0.0769;
       tmp+= tex2D(TextureSampler, UV.xy + float2( Size.x, -Size.y)) * 0.0769;
       
       tmp+= tex2D(TextureSampler, UV.xy + float2(-Size.x,       0)) * 0.0769;
       tmp+= tex2D(TextureSampler, UV.xy + float2(	     0,       0)) * 0.0769;
       tmp+= tex2D(TextureSampler, UV.xy + float2( Size.x,	      0)) * 0.0769;
       
       tmp+= tex2D(TextureSampler, UV.xy + float2(-Size.x,  Size.y)) * 0.0769;
       tmp+= tex2D(TextureSampler, UV.xy + float2(      0,  Size.y)) * 0.0769;
       tmp+= tex2D(TextureSampler, UV.xy + float2( Size.x,  Size.y)) * 0.0769;
       
       tmp+= tex2D(TextureSampler, UV.xy + float2(        0,  Size.y*2)) * 0.0769;
       tmp+= tex2D(TextureSampler, UV.xy + float2(        0, -Size.y*2)) * 0.0769;
       tmp+= tex2D(TextureSampler, UV.xy + float2( Size.x*2,         0)) * 0.0769;
       tmp+= tex2D(TextureSampler, UV.xy + float2(-Size.x*2,         0)) * 0.0769;
       
 return tmp;       
}
 
float4 InvertTexture(VS_INPUT Input) : COLOR0{ 

  half4 Blured = GaussianBlur(Input.Texcoord, 0.001);

  return Blured; 
} 
 
technique TransformTexture { 
    pass P0 { 
        VertexShader = compile vs_2_0 NullVertexShader(); 
        PixelShader = compile ps_2_0 InvertTexture(); 
    } 
}