Sign in to follow this  
freka586

Best way to manually manipulate depth and/or stencil?

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this