GL_ARB_depth_texture info

Started by
1 comment, last by Mocanu Razvan 18 years, 6 months ago
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!
-= wolfwood :: rpg =-
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.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
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.
-= wolfwood :: rpg =-

This topic is closed to new replies.

Advertisement