View Full Version : How to use Z-buffer to compute tex-coords

Joe Canone
10-08-2002, 06:08 AM
If i would convert the Z-buffer to a texture anyway, would it be possible to use it to compute texture coordinates for another rendering-pass? Example: bright Z-pixels should produce top-left UV-coords and dark Z-pixels should produce bottom-right UV-coords for the actual texturing operation.
Maybe this is possible through (upcoming) depth-textures, the register combiners and/or pixel shaders?

10-08-2002, 06:25 AM
you can convert the depth (z-buffer) to a texture, via ARB_Depth_texture.. works fine.. then use it as a texture lookup, well why not..