Pro OpenGL ES for iOS

(singke) #1

CHAPTER 7: Well-Rendered Miscellany (^229)
Blob Shadows
Blob shadows are a total cheat. It simply assumes that there is no real direct light
source, so the object’s shadow is little more than a blob underneath, as shown in Figure
7-10. As you can see, this won’t work too well if our occluder (the shadow casting thing)
is a giant man-eating burrito.
Figure 7-10. A blob shadow texture that is placed under all objects
Projection Shadows
Projection shadows are the ‘‘easiest’’ of the dynamic shadows algorithms to implement,
but of course that also means they come with many restrictions, namely, that projection
shadows work best when casting a shadow on a large flat surface, as shown in Figure
7-11. Also, shadows cannot be cast on arbitrary objects. As with the other approaches,
the basic process is to take a snapshot of sorts from the light’s point of view and one
from the camera’s. The light’s view is squashed down flat on the plane, painted a
suitable shadowy color (aka dark), followed by the occluder being rendered on top.

Free download pdf