Jump to content
  • Advertisement
Sign in to follow this  
Mocanu Razvan

GL_ARB_depth_texture info

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

Hi! I'm working on an engine that displays pre-renderer background images. I have the depth values for the image. I know about the depth texture extension but i don't know whether it suits my purpose or not. Can I use it to store the depth values in a texture and then render it to the depth-buffer? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
IIRC depth texture allows you to do exactly the opposite -- that is, write depth into a texture.

One thing I can think of is using a pixel shader to write out Z based on a texture read, and draw a full screen quad like that. I can't say what the performance implications would be though, and it won't run on old hardware, which seems like where it would be the most useful.

Share this post


Link to post
Share on other sites
Hey, thanks a lot.
I was actually using glDrawPixels(..., GL_DEPTH_COMPONENT, ...). After reading some threads on the forum, I think it wasn't working because i had the near plane at 0.1 and far plane at 1000 (!). I wanted another solution and came upon depth texture.
Thanks again for the reply.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!