sampler2D screenTexture; half2 BrightContrastValues; // Vertex Shader Output Structure struct vertexOutput { half4 oPosition : POSITION; half2 oTexCoord : TEXCOORD0; }; // Vertex Shader // Simply passes the position and texture coords through vertexOutput motionBlurVP( half4 position : POSITION, half2 texCoord : TEXCOORD0 ) { vertexOutput OUT = (vertexOutput)0; OUT.oPosition = position; OUT.oTexCoord = texCoord; return OUT; } // Pixel Shader half4 motionBlurFP( vertexOutput IN ) : COLOR0 { half3 rgb = tex2D(screenTexture, IN.oTexCoord).rgb; // contrast and brightness modification rgb += BrightContrastValues.xxx; rgb -= 0.5h.xxx; rgb *= BrightContrastValues.yyy + 1.h; rgb += 0.5h.xxx; return half4( rgb, 1.h); } // Technique for combining Bloom and Depth of Field technique motionBlur { pass p0 { VertexProgram = compile vp30 motionBlurVP(); FragmentProgram = compile fp40 motionBlurFP(); DepthTestEnable = false; DepthMask = false; BlendEnable = false; } }