Stencil Shadow Volume demo

Blitz3D Forums/Blitz3D Programming/Stencil Shadow Volume demo

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I think he wants to light his level without using lightmaps. The shadows would be static but they'd be sharp, and they would affect characters who walk through them.

They'd greatly limit how high poly your levels can be though... You can't have every pipe and railing and such casting stencil shadows, unless you limit yourself to very few pipes and railings. The shadow volumes increase the polygon count a lot, and the overdraw also would hurt the framerate.

Also I wonder how one would handle multiple lights? With one light you can generate a shadow volume for each object it casts a shadow from. But what if an object is in shadow from one light, but lit by another? How do stencils handle that? You must have to render the scene once for each light? That'd be pretty expensive.