//------------------------------------------------------------------------------------------------------------
//	MS shadow volume sample modified to implement Z-FAIL algorithm
//	Z-FAIL requires front and back capping of the extruded shadow volume
//	Z-FAIL requires to use a semi-infinite projection matrix to disable far-plane clipping
//	Author	: Charles-Edouard Breteche (aka Lion)
//	Date	: 02/04/2003
//	Contact	: eddycharly@hotmail.com
//	TODO	: infinite extrusion of the shadow volume
//------------------------------------------------------------------------------------------------------------

I preserved all the previous code, i just commented a few lines, and added a comments above each line i changed in the source.

I also added three 'defines' at the top of the file, that lets you change the behavior of the algo.
Namely : one for enabling front caping, one for back caping, and one for the semi-infinite projection matrix.

I used to use the front-facing triangles to create the front cap, but in the MS sample, they use the back-facing triangles for this.
Using back-facing tris to create the caps makes that biasing the shadow volume is not required anymore.

That's all, don't be scared, depth-fail is not harder than depth-pass.

What is still to do is to extrude the volume at infinity.

After that, i guess that it can be called 'robust stencil shadow volume'  

BONUS : I changed the silouhette detection algorithm to a more performant one.
