Learning path

Full curriculum

Full curriculum

Unit content

Local illumination and surface shading

Surface shading estimates how much light a visible point sends toward the camera from local geometric and material information.

For a unit surface normal $\mathbf{n}$ and unit direction $\mathbf{l}$ toward a light, ideal diffuse or Lambertian reflection contains the factor

$$\max(0,\mathbf{n}\cdot\mathbf{l}).$$

A surface facing the light receives more illumination than one viewed at a grazing angle, while a surface facing away receives none from that light.

Glossy highlights depend additionally on viewing direction. Simple real-time models such as Phong or Blinn-Phong add a specular term concentrated near the mirror-reflection direction or half-vector.

These models are local: they consider a light, the current surface and the viewer without solving all indirect light transport through the scene. Shadows, interreflection and complex material scattering require additional visibility or global-illumination calculations.

Normals, light directions and view directions must be expressed in compatible coordinate spaces before their dot products have geometric meaning.