How to use Z-buffer to compute tex-coords

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?

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…