Stencil Shadow Volume demo

Blitz3D Forums/Blitz3D Programming/Stencil Shadow Volume demo

Once, I read something about shadow volumes, and it said
that sometimes it could be better to cast each polygon
independentely instead of doing the shadow volume
calculations.

I ended up doing this:

http://tecno-itb.coloniesonline.co.uk/imgs/Volumes.zip

you can use the CreateShadowVolume() function
with any model, the only thing needed is that
the light object must have a child at the
position 0,0,1 (this is only to retrieve a vector).
Then, the function will create a shadow volume for
each polygon of each surface.

I tried to implement this in the DX7 code from Tom,
but I found that when there are more than one volume
in the screen the shadow is not correct
at all ... may be someone can fix it ..

later!
Paolo.