Chapter 7

Mapping Samples to a Hemisphere



By the end of this chapter you should:

  • understand how to map sample points from a square to a hemisphere with a cosine power density distribution;
  • have the sampling tools available to model a number of direct and indirect illumination effects.

A number of shading applications in later chapters require sample points distributed over the surface of a unit hemisphere. These samples need to have a density that varies as a cosine power of the polar angle measured from the top of the hemisphere. The reason is a cosine factor in the rendering equation (Chapter 13) and because some of the BRDFs ...

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.