Jump to content
  • Advertisement
Sign in to follow this  
ErikPersson

Depth reading?

This topic is 4997 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

Is it possible to read z values from the depth buffer or do i need to render the z values to a texture (and if so how is this done) to obtain depth information? I havent found any pixel shader instruction that gets the depth value from the depth buffer and I find this strange since the depth buffer gets read/written to for every pixel, if depth buffering is enabled.

Share this post


Link to post
Share on other sites
Advertisement
Well, I know you can create your own depth/stencil surface, and then use pDevice->SetDepthStencilSurface() to make the device use that surface. Then you can lock it to get access to it. Don't know if you can read from it while using it though...

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!