PDA

View Full Version : Shadow Volumes and Silhouette



unreal
09-01-2004, 12:16 AM
hello!!!
OK... I have my z-fail algorithm and i can cast shadow volumes. but i cast them for every single triangle.

lets say i have a polygon list with the polygons(triangles) that cast shadows. how i can compute the silhouete for the shadows volume?
thanks in advance!

rgpc
09-01-2004, 03:02 AM
You do the dot product between the normalised light vector and the normal of each tri in your mesh. Faces that have a dot >= 0 are facing towards the light, faces with a dot < 0 are facing away from the light, the edges that separate tris that are towards and tris that are away is your silhouette.