Depth Rejected Gobo Shadows
This chapter describes a technique to provide soft shadows using a single tex-
ture sample in environments where the objects casting shadows and the objects
receiving shadows are disjoint. This is common in games where the lighting on
the static environment is prebaked into lightmaps and dynamic objects are later
combined into the world.
Note that the soft shadows using this technique will only be cast onto prelit
environment surfaces and not on themselves (i.e., self shadowing) or from one dy-
namic object to another. In these cases you need to use standard soft-shadowing
techniques such as percentage closest ﬁltering (PCF), variance [Donnelly and
Lauritzen 06] or exponential shadows maps [Salvi 08]; otherwise the object will
receive nonﬁltered blocky shadows.
2.2 Basic Gobo Shadows
Before we discuss the technique, it is worthwhile to take a step backwards and
describe a very simple technique for soft shadows using gobo projected textures.
A gobo is a theatrical term that refers to a cutout shape that can be placed in
front of a spotlight light bulb. When the spotlight is turned on, the gobo cutout
will partially block some light and the resultant shape will be projected onto the
In games we can apply the same trick by applying a similar black or white
texture to a projected light. The result is a soft image that casts onto the world.
This texture can therefore be used to fake a shadow from an object. A common
example of this in games is to have the light source in a wired cage; the gobo is
then used to fake the shadow from the cage onto the world. As in the theater,
the trick relies on the fact that any moving objects cannot move in between the
light source and the world object from which the gobo is used to fake shadows
(see Figure 2.1).