The Z-Buffer for the Mutiple Render Target

Started by
2 comments, last by remigius 15 years, 1 month ago
I was use MRT for a "render to target" algorithm. I need Z-test to be on. And from the SDK I known I should create my own DepthStencil surface to make the size match. But as I have two render target (eg. 512X512 each),what size do I need to create My DepthStencil surface,512X512 or 1024X1024? I have set it to 512X512,but it seems that the z-test doesn't work, Is there any other things I need to do to achieve this?
Advertisement
Your DS surface should be 512x512, to match the dimensions of your render targets.
Quote:Original post by MJP
Your DS surface should be 512x512, to match the dimensions of your render targets.


You are right, I'd resoved it. Thanks for reply!
Quote:Original post by MJP
Your DS surface should be 512x512, to match the dimensions of your render targets.


While matching the dimensions does sound like the right way to do things, I recall a larger depth/stencil would still work in MDX without any complaint from the debug runtimes. Has that changed more recently or did I just get lucky back then? [smile]
Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!

This topic is closed to new replies.

Advertisement