Stencil Shadow Volume demo

Blitz3D Forums/Blitz3D Programming/Stencil Shadow Volume demo

Screenie is sweet :D

This is basically the problem for ati cards:
Graphics3D 640,480,32,2
cam=CreateCamera()
PositionEntity cam,0,3,-6
RotateEntity cam,30,0,0

shadowplane=CreateCube()
ScaleMesh shadowplane,10,10,.1
EntityColor shadowplane,256,256,256

CameraClsMode cam,False,False

While Not KeyHit(1)
	Cls
	RenderWorld
	RenderWorld
	Flip
Wend


Double render world apparently throws up a bunch of odd artifacts 0_o. This snippit doesnt work on anyones card as far as i can tell. Probably what's happening is since the zbuffers are the same between frames it thinks only a little if any should be drawn... Dunno why it clears the color buffer if this is the case though.