Spot light with shadow volumes

Forget shadowing for a while. If you render your scene with a single spotlight, without shadowing and with no ambient, what do you see outside of the spotlight cone? If the answer is anything other than “black”, something’s wrong.

The typical way to implement spotlights is to use a projected texture of a fuzzy white blob. The light itself is a regular omni point light, but by modulating it with the projected texture, you can model the spotlight cone. Because the borders of the texture are black, it also automagically guarantees that everything outside the cone is invisible.

If you think source code might help, I have several relevant demos:
http://www.delphi3d.net/listfiles.php?category=4

– Tom