• Advertisement
Sign in to follow this  

Best way to manually manipulate depth and/or stencil?

This topic is 4856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on an all-software volume renderer. Since I need to include non-volume objects I need to manually write Z values into my depth buffer at the correct location. How should I do this most efficiently? Speed is not too critical, as rendering times are in the order of many sec/frm anyway. My first thought was: 1) Get depth buffer (GetDepthStencilSurface) 2) Lock rectangle 3) Fill with info 4) Unlock 5) Set depth buffer (GetDepthStencilSurface) But since I currently also use the stencil buffer I am forced to use a format such as D24S8 - not lockable! Any ideas on how this should be done? Ideally, I want to accomplish writing Z values, still be able to use stenciling and all this without actually rendering geometry.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement