float4 vecSkill1;
float4 vecSkill5;
texture TargetMap;
sampler ColorSampler = sampler_state { Texture = <TargetMap>; MipFilter = Linear; MinFilter = Linear; MagFilter = Linear; AddressU = Clamp; AddressV = Clamp; };
float2 fOffset3x3[9] = { -1,-1, 0,-1, 1,-1, -1,0, 0,0, 1,0, -1,1, 0,1, 1,1 };
float fGauss3x3[9] = { 0.0625, 0.125, 0.0625, 0.125, 0.25, 0.125, 0.0625, 0.125, 0.0625 };
float4 PS ( in float2 inTex: TEXCOORD0 ) : COLOR0
{
inTex.xy -= 0.5f;
inTex.xy *= vecSkill1.z;
inTex.y *= vecSkill1.w;
inTex.xy += 0.5f - vecSkill1.xy;
float4 Color = 0;
for ( int i=0; i<9; i+=1 )
Color.rgb += tex2D ( ColorSampler, inTex + fOffset3x3[i] * vecSkill5.xy ).rgb * fGauss3x3[i];
Color.a = 1.0f;
return Color;
}
technique
{
pass
{
VertexShader = null;
PixelShader = compile ps_2_0 PS();
}
}