Stencil Shadow Volume demo

Blitz3D Forums/Blitz3D Programming/Stencil Shadow Volume demo

The new SystemProperty$() commands has opened up Blitz to stencil ops, here's an example of shadow volumes. The guts of the code is from one of the DX 7 SDK examples.

NOTE! This is very raw! No pixel format checking at all, and some of the guys in Irc (all with ATI cards it seems) get a garbage display instead of eye candy so PLEASE don't complain if it's screwed up, I'm a crap coder and I've only been looking at the DX 7 SDK since v1.88 :) But that can be fixed with some checking.

anyways, just wanted to post to show a hardware shadow solution is possible since v1.88, alongwith maybe some other tricks.

http://www.tomspeed.com/ShadowVolume.zip



Oh yeah, if the demo works (hehe) the sphere represents a shadow volume, which in game terms, would normaly be produced 'on the fly', that could be costly, and unfortunately building a shadow volume from an animated mesh could be near impossible because we can't access deformed vertex position right now, but you never know :)

Cya
Tom