Chapter 14

Lights and Materials



By the end of this chapter, you should:

  • know the difference between direct and indirect illumination;
  • understand how directional lights and point lights are defined;
  • understand how ambient and diffuse shading work;
  • have implemented ambient and diffuse shading with directional and point lights and a matte material.

In this chapter, I’ll start to discuss shading, the process that gives visual appearance to objects. Without shading, we can only render objects with constant colors, as in Chapter 3, where all of the objects look flat. Shading results from the interaction of light with the surfaces of objects, ...

Get Ray Tracing from the Ground Up now with O’Reilly online learning.

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