// basic postprocess shader // assume inputTexture bound to sampler 0 //sampler inputTextureSampler : register(s0); texture inputTexture; sampler inputTextureSampler = sampler_state { texture = ; AddressU = CLAMP; AddressV = CLAMP; AddressW = CLAMP; MINFILTER = POINT; MAGFILTER = LINEAR; MIPFILTER = NONE; }; texture frameTexture; sampler frameTextureSampler = sampler_state { texture = ; AddressU = CLAMP; AddressV = CLAMP; AddressW = CLAMP; MINFILTER = POINT; MAGFILTER = LINEAR; MIPFILTER = NONE; }; float time=0; float4 PS( float2 Tex : TEXCOORD0 ) : COLOR { float4 color = tex2D(inputTextureSampler, Tex); color = dot(color, float4(0.30f, 0.59f, 0.11f, 0.0f)); float4 colorFrame = tex2D(frameTextureSampler, Tex); return lerp(color,colorFrame,time); } technique DefaultTechnique { pass P0 { // shaders PixelShader = compile ps_2_0 PS(); } }