views:

47

answers:

1

Is there a way, in the XNA framework, to render your 2D scene using the typical SpriteBatch method and then, after that frame is rendered, apply effect to the whole image?

For example, blurring, sepia or even making the whole thing look like an old time movie film, with grain, dust, lines, etc?

+3  A: 

Yes - what you'll do is set the render target to render to a texture instead of out your graphics hardware. Then, once your output is in a texture you'll apply your pixel shader effects, and send it off.

Some great basic sample effects are available here (I heartily recommend subscribing to this blog as well) http://blogs.msdn.com/b/shawnhar/archive/2007/05/23/transitions-part-four-rendertargets.aspx

seraphym
There's also a whole set of Postprocessing samples in the Creators Club: http://creators.xna.com/en-US/education/catalog/?devarea=15 (The Bloom sample is a good one for what you want.)
Andrew Russell