View Full Version : Stencil shadow problem

05-14-2004, 03:38 PM
i am having a problem with my shadows on my app,
they act normal but when you step into them they dissappear. what happends is that the front faces (of the shadow mesh calculated from the real mesh and light source) increment the stencil values and the back faces decrement them, when you enter the shadow volume only the back faces are rendered, how can i fix this so that the shadows render properly?? thanks in advance.

Eric Lengyel
05-14-2004, 06:41 PM
You need to switch to a depth-fail variant of the algorithm when the camera might be inside a shadow volume. The following article gets pretty deep into the whole thing:


-- Eric Lengyel

05-14-2004, 08:21 PM
Thanks, you have been a huge help.