Stencil Shadow Volume demo

Blitz3D Forums/Blitz3D Programming/Stencil Shadow Volume demo

"With the new access to core of DirectX, maybe a RenderToTexture() function could be made, which would speed up a software shadow mapping solution?"

In some instances, it would.


"What would you say was the biggest slowdown in your shadow system?"

Both rendering shadows and culling polygons to generate shadow meshes are costly. My system is culling limited when working with complex levels and lots of casters. But if you run my shadow demo, and crank up the shadow resolution and use two lights you will see the shadow map rendering can kill the framerate in some cases.

Rendering directly to a texture would greatly speed up the shadow map rendering. In most games that might translate to a gain of several FPS. I have optimizations in place to reduce rendering which speeds things up, but that doesn't work on animated meshes which are what most people use.

A stencil shadow system is likely to be a lot faster than my system. But the stuff we've seen so far is only the tip of the iceberg as far as making one. You still need a way to generate the shadow volumes. I'd have to read up on how doom does that but I know it involves deforming the mesh on the video card. And it may require vertex shaders.

I think the current state of stencil shadows in Blitz would allow one to have theor levels cast stencil shadows. Static ones at least. Dynamic would be possible but probably too slow in software.

I think you need vertex shaders to do dynamic stencil shadows.