Stenciled Shadow Volumes
Triangle blockinglight source.
“Shadow” volumeprojected by trianglefrom the light source.
Use stencil to tag whetherpixel is inside or outsideof the shadow volume.
Two passes: light pixels outsidevolume; no lighting forpixels inside the volume.