200 CHAPTER 6: Will It Blend?^
Figure 6-18. Huh?
What’s happening is that we are going where no combiner has gone before. By sticking
in our own lighting, the effect of the simulated lighting as provided by the light vector is
removed. With our light on the left, it just happens to look good mainly by luck. Bump
mapping here works OK if the lighting of your scene is relatively static. It doesn’t like
multiple light sources. In fact, the pseudolighting effect specified via the light vector is
ignored in lieu of the ‘‘real’’ light sources. Furthermore, if you turn off those sources, the
light vector ignores any of the shading on the object altogether. In this case, you would
see the entire planet lighten up and darken because that’s what is happening to the
texture itself, because it is merely a 2D surface. If part of it is lit, all is lit. So, what’s a GL
nerd to do? Shaders my friend. Shaders. And that is where OpenGL ES 2 and the iOS 5
extensions come into play; they are covered in Chapter 10.
Summary
In this chapter, you learned about the blending capabilities supplied by OpenGL ES 1.
Blending has its own unique language as expressed through the blending functions and
combiners. You’ve learned about translucency, how and when to apply it. Also covered
were some of the neat tricks available by using both blending and textures for animation
and bump mapping. In the next chapter, I’ll start to apply some of these tricks and show
others that can make for a more interesting 3D universe.