Transfering depth to alpha and other things

Just a quick question is there a way such that I can copy the depth channel to the alpha channel without having to copy it to CPU menory (so it stays on the graphics card)? I not really interested in non-standard extensions but I’ll give them a try >:-)

Originally posted by wleeson:
I not really interested in non-standard extensions but I’ll give them a try >:-)

Hi

but there is the NV_copy_color_depth extension which copies the depth stencil buffer into the color buffer.

Another option would be to copytexsubimage the depth buffer into a texture and then render a fullscreen quad with proper writemasks. Ideally the texture won’t get copied into system memory.

Bye
ScottManDeath

That’s exactly what I need thanks. (Should have thought of it myself, how stupid am I?).