Chapter 16

Shadows

image

Objectives

By the end of this chapter, you should:

  • understand why shadows are important in ray tracing;
  • understand the terminology of shadows;
  • understand why it’s important to use t > ε > 0 in all ray-object hit functions;
  • understand why shadows can be expensive to implement;
  • have implemented hard-edged shadows with point and directional lights.

Shadows are everywhere in the real world, both indoors and outdoors. Shadows are also free in the real world, but as you will find out in this chapter, shadows are not free in ray tracing.1 Here, I’ll look at why shadows are important, what they are, why they can be expensive to ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.