Hello people!
I have a problem with some math when rendering shadow volumes.
First I calculate the silhuette edges and the I render the shadow volume like
Unreal, why does your for loop look that way? It will run slow.
Either render all front faces first, then back faces and use unclamped stencil features or use two sided stencil feature with unclamped stencil.