Render To Texture

May 16, 2009 at 1:12 AM

I want to create a texture where I render everything in my scene as a depth pass, is there an easy example how to do this?  None of the tutorials seemed appropriate.

Coordinator
May 16, 2009 at 1:32 AM

If you mean render depth into a texture, then yes, this is actually done in the shadow mapping tut.
If you mean render depth into a depth buffer, which to read from or to then use in another render target, then unfortunately XNA doesn't support this. (It will always clear depth no matter what you do)

May 16, 2009 at 3:33 AM

I meant the first one (depth into a texture).  Ill look at the shadow mapping tut, thanks again.