Skip to main content
gamedev.net
🔒 Locked

Render targets.

Started by Phantom Sage 0 replies 400+ views
Original Post
Phantom Sage
Phantom Sage
I'm having a brainfart, I can't remember if you need to attach z-buffers to render targets or not? Yeah, it's a dumb question, my brain switched off after 11 rye & gingers and has yet to resume operation.
sirob
sirob
That depends on what you'd want to do with them. :)

If you're rendering with Z-buffering disabled, and Stencil desabled, and you don't call Clear with the Z flag, then you don't need to change the z-buffer when changing buffers.

If, on the other hand, you're planning on drawing with Z-buffering, you'll either need to make sure the Z-buffer currently in use has the same dimentions as the render target, or create a new one and use that one.

Don't forget - if you draw with the same Z-buffer to different targets, you need to make sure the extra data doesn't mess up the drawing, or clear it somewhere in the middle.

Hope this helps.
Sirob Yes.» - status: Work-O-Rama.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.