sampler RT: register(s0); float dist; float offx; float offy; float fSize; float fSharpness; float fRatio; float fAlpha; float4 PixelShader(float2 texCoord: TEXCOORD0) : COLOR { float sampleDist0 = dist; float2 samples[1] = { offx, offy, }; float2 samples2[1] = { -offx, -offy, }; float4 sum = tex2D(RT, texCoord); for (int i = 0; i < 1; i++){ float a = pow(max(0,min(1,sqrt(pow(texCoord.y-0.5,2)/fRatio+pow(texCoord.x-0.5,2)*fRatio)/fSize)),fSharpness)*fAlpha; float4 col1 = tex2D(RT, texCoord + sampleDist0 * samples[i] * a); float4 col2 = tex2D(RT, texCoord + sampleDist0 * samples2[i] * a); float4 magenta = {1,0,1,1}; float4 green = {0,1,0,1}; sum += col1 * magenta; sum += col2 * green; } return sum / 2; } technique tech_main { pass P0 { PixelShader = compile ps_2_0 PixelShader(); }}