Limiting stencil shadows

BlitzMax Forums/OpenGL Module/Limiting stencil shadows

JoshK(Posted 2006) [#1]
How should you keep stencil shadows from passing through walls, and rendering on surfaces that are behind walls? I mean, if you project a stencil shadow from a lightpost onto a building, the outside of the building will be shadowed, but the interior of the building will have the shadow inside it as well.


fredborg(Posted 2006) [#2]
Well, it should zero out because the wall also casts a shadow.

Otherwise (if the wall isn't casting shadows) you have to do zones or occlusion testing, and not cast shadows from the outside when viewing from the inside.