I'm trying to get the Glow shader technique discussed in a Gamasutra article (http://www.gamasutra.com/features/20040526/james_pfv.htm) implemented in my XNA project but am struggling with certain aspects of it. The blur of the scene takes place in two separate passes, one for each axis. So when you do the horizontal blur pass, you pass it your scene which you've rendered to a RenderTarget2D. Then for the vertical blur pass which follows, you have to pass it the resulting texture from the previous pass. This is where I don't really understand anymore... what is the proper way to set this up so that you can extract the results of the first pass and give it to the second pass when you already have an Effect activated

Post-Processing glow shader
day10
I suggested a solution here: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1211515&SiteID=1
I didn't test it, and the initial poster didn't confirm if the second version of the code works, but you might give it a try.
nagual20
saarar
XycsoscyX
it makes no difference.
Just replace the SpriteBatch code with your rendering code. It isn't that hard to do, if you put a little effort in it.
SOTY_Programmer
Ok.
The code I posted in only intended for the post-processing step, where you render only one quad to cover the screen, and apply post-processing effects on it. It isn't intended for model rendering. That should be done normally, before any post effects are applied.
Resolving the render target doesn't "unset" it. So after resolving it to a texture, I simply act as if the rendertarget is empty, and draw over it.
And also, the SpriteBatch doesn't have to fit in with evetything. It is simply a replacement from drawing a full-screen quad yourself. If you don't need it, just don't use it.
Later in the development of my game, I'll revisit my post-processing code (right now it is kinda hacky). After that, I will try to post a tutorial covering the methods I used. But don't expect it too soon, since the gameplay is more of a priority right now.
kawano1h
Sorry, but I've tried tooling around with the code you posted, but it doesn't seem that simple. When you are rendering a Mesh like I am, you don't call Effect.Begin() and Effect.End() manually... its done automatically by ModelMesh.Draw() as far as I can tell. Same goes for the pass.begin() and pass.end() methods. So I have no idea how all the SpriteBatch stuff fits in with the way I've got my stuff set up.
And then there is the fact that the code you wrote resolves the render target, but then never again sets a render target. How is that supposed to work
Sportsdude
For everyone else's point of reference, the XNA version of Rocket Commander can be downloaded here: http://exdream.no-ip.info/blog/PermaLink.aspx guid=442152d0-a014-47de-b9b1-4e8aed1d9bd3