Generally post-processing works over the entire screen. This is pretty simple, really.
What you do is set a render target on the device (I assume you can figure out how to create a render target from the sample):
GraphicsDevice.SetRenderTarget(renderTarget);
From this point onward everything you render will be rendered to that render target. When you're done you can set the device back to drawing to the back buffer:
GraphicsDevice.SetRenderTarget(null);
And finally you can draw using your render target as if it were a texture (this is new in XNA 4.0, in XNA 3.1 you had to call GetTexture
on it).
So to making a post-processing effect:
- Render your scene to a render target
- Switch back to the back buffer
- Render your render target full screen (using
SpriteBatch
will do) with a pixel shader that will apply your post-processing effect.
You sound like you want to do this per model? Which seems kind of strange but certianly possible. Simply ensure your render target has a transparent alpha channel to begin with, and then draw it with alpha blending.
Or do you not mean post-processing at all? Do you actually wish to change the pixel shader the model is drawn with, while keeping the skinned model vertex shader?