Chapter 7

Mapping Samples to a Hemisphere

image

Objectives

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 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.