8. Lighting and Heirarchical Objects

Chapter Overview:

This chapter focuses on lighting objects, looking at different light sources and their effects

on the 3D scene. Lighting is essential if you want to create realistic 3D scenes because it

helps to give the scene a sense of depth.

The following key points are discussed in this chapter: (1) shading, shadows, and different

types of light sources including point, directional, and ambient; (2) reflection of light in

the 3D scene and the two main types: diffuse and ambient reflection; and (3) the details of

shading and how to implement the effect of light to make objects look three-dimensional.

1. LightedCube

2. LightedCube_animation

3. LightedCube_ambient

4. LightedTranslatedRotatedCube

5. PointLightedCube

6. PointLightedCube_animation

7. PointLightedSphere

8. PointLightedSphere_perFragment

9. PointLightedCube_perFragment