I am having a problem with the faces making up the sides of a shadow volume: Sometimes they’re treated as back faces altough they’re front faces, and vice versa.
I know that this has to do with the order in which I pass the sides’ quad vertices to OpenGL. This order simply depends on the order of the vertices of the silhouette edge the quad has been constructed of.
I am gathering all edges more or less in a random sequence by simply processing each face of the model one by one as they are stored in memory. So whatever face comes first determines the order of the edge’s vertices.
How do I make sure front and back faces of the shadow volume are always rendered properly? I just can’t get this to work.