Classic Lighting Model

The classic lighting model adds up a set of independently computed lighting components to get a total lighting effect for a particular spot on a material surface. These components are ambient, diffuse, and specular. Each is described below, and Figure 7.1 shows them visually.

Image

Figure 7.1. Elements of the classic lighting model (Ambient (top left) plus diffuse (top right) plus specular (bottom) light adding to an overall realistic effect.)

Ambient light is light not coming from any specific direction. The classic lighting model considers it a constant throughout the scene, forming a decent first approximation to the scattered ...

Get OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition 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.