Jump to content
  • Advertisement
Sign in to follow this  
myers

OpenGL Sampling from a depth texture bound to the FBO

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

On DX11, disabling depth writes allows you simultaneously to sample and depth-test against the same depth texture. This feature is useful, for example, for soft particles: without it, you'd either have to make a copy of the depth texture, or disable depth testing and lose early-z culling.

 

Is this supported in OpenGL 4+? If I call glDepthMask(0), is it safe to assume that I can sample from the depth texture bound as an attachment of the FBO I'm rendering to? I see nothing in the specs to indicate that it is. I don't notice any problems on my hardware, but I've found that a lot of off-spec behaviour works ok on Nvidia.

Edited by myers

Share this post


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

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!