// Pixel shader input structure struct PS_INPUT { float4 Position : POSITION; float2 Texture : TEXCOORD0; }; // Pixel shader output structure struct PS_OUTPUT { float4 Color : COLOR0; }; // Global variables sampler2D Tex0; float fCoeff; int nSteps; PS_OUTPUT ps_main( in PS_INPUT In ) { // Output pixel PS_OUTPUT Out; int i; float fCoeffCurrent=fCoeff; if(nSteps>0) { PS_OUTPUT TexT; PS_OUTPUT TexTL; PS_OUTPUT TexL; PS_OUTPUT TexBL; PS_OUTPUT TexB; PS_OUTPUT TexBR; PS_OUTPUT TexR; PS_OUTPUT TexTR; PS_OUTPUT TexF; Out.Color.rgba=0.0f; for(i=0;i