Capped Shadow Volume

When I want to draw a capped shadow volume
I proceed as outlined by lengyel in his article

for a silhouette edge I do…

  1. take all vertices from a triangle that faces towards the light

  2. extrude all vertices from a triangle that faces away from the light to infinity with respect to the light direction

Until now I add those vertices into my List of vertices making up the silhouette …
but It is said that the shadow volume should be closed should I therefore insert the vertices in such a way that I get some polygon formed by the front cap, back cap and sideplanes closing the front and back cap

or is it totally sufficient to inseert the vertices to have a triangle that represents the front cap and the vertices to have a back cap.

tnx for your help

looks like nobody is willing to answer my question but I hope this one will be answered (tnx in advance)

When extruding the vertices V of a shadow quad for a silhouette edge to infinity the formula


V'= <V.x - L.x, V.y - L.y, V.z - L.z, 0>

is used. Is this correct? I drew those quads for a simple cube but my idea would be to use

V' = <V.x + (V.x - L.x), V.y + (V.y - L.y), V.z + (V.z - L.z), 0>

instead. Since in (1) I get shadow quads starting at the origin and pointing to some V’
but according to my understanding I want a Shadow Quad V’
starting at the V and pointing to V’

please help me


I know this paper … this is where (1) is from (so it must be correct) but it is against my oppinion … but if everyone uses that … tnx

Extruded silhouette polys should go from their original location V to their projected location V’. How you compute V’ depends on whether V and L are expressed in general homogeneous coordinates (V.w != 1). You need a more general expression if they are.

Otherwise it looks like you’re on the right track.

You might also take a look at:

Thanks -

I read lengyel’s article on shadow volumes and he
extruded the vertices like this

V’ = V.w*L + <V.x-L.x, V.y-L.y, V.z-L.z, 0>

V is processed prior to have w=0 for Vertices to be extruded and w = 1 for vertices extruded not to be extruded

this results in the Code I displayed in (1) for vertices to be extruded

Because you’re projecting to infinity, all that matters is the direction V - L. Any offset is immaterial when going to infinity.

Here is another little bit that may help …

Thanks for your answer. I saw it working in my small little app and it looks alright.