PDA

View Full Version : Transfering depth to alpha and other things



wleeson
01-27-2003, 09:12 AM
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 >:-)

ScottManDeath
01-27-2003, 11:24 AM
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 http://www.opengl.org/discussion_boards/ubb/wink.gif 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

wleeson
01-28-2003, 10:55 AM
That's exactly what I need thanks. (Should have thought of it myself, how stupid am I?).