multipass lighting with alpha

Normally I draw objects with a two passes. One for lighting and one for texturing. For the 2nd pass I enable blending and multiply the textures together.

But now I’d like to turn one of these objects into a transparent ghost.

How is this possible?

For transparent geometry, you have to be able to solve the lighting equation in a single pass on the frame buffer, which either means first render it to an offscreen buffer, or it means using sufficient amounts of multitexturing.

There are depth peeling tricks you can make coupled with the stencil buffer which might also help, assuming you’re not using the stencil buffer for something else. Do a google for “depth peeling”.

[This message has been edited by jwatte (edited 12-07-2002).]