4. Shedding Some Light

3D computer graphics technologies convert mathematic descriptions of objects into convincing illusions. The human brain interprets pictures displayed on a flat screen and perceives non-existent depth based in part on geometric hints. For example, small objects are usually perceived to be further away than large objects. An object that partially covers another object is perceived to be in front. However, simulated lighting effects are also necessary to present the illusion of depth. Consider two renderings of the same geometric data in Figure 4.1. The image on the left is rendered without lighting. The image on the right is much more convincing with simulated lighting.

Figure 4.1. The same geometric data rendered without ...

Get Learning OpenGL ES for iOS: A Hands-On Guide to Modern 3D Graphics Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.