PDA

View Full Version : Depth textures



loosermanu
02-26-2003, 12:34 PM
Is there a way to put z information in a texture (relative to the textured surface, not absolute screen space Z) and render it ?

Humus
02-26-2003, 02:13 PM
I suppose you could use the depth-write feature of GL_ARB_fragment_program.

dorbie
02-26-2003, 07:54 PM
Yes this is possible. Nvidia did this in their tide pool demo calling it "z correct bump mapping". Unfortunately they've managed to hide it so well I can't find any reference to it on their site.

VikingCoder
02-27-2003, 07:41 AM
ATI also showed it for their Mojo Day presentation, with an extremely nice looking explosion on a field. Two quads, but it looked great, because the explosion quad was a billboard with depth per pixel in an animation.

Slide 15 of 88 here:
http://www.ati.com/developer/JasonM_Shading.pdf

CWiC
02-28-2003, 05:37 AM
This is possible with NV_texture_shader and NV_texture_shader3 (dot_product_depth_replace and dot_product_affine_depth_replace respectively) as well. Just use depth scale and bias via texture stages coordinates for placing depth-sprite in right place at scene.