04 · Lighting and shading

One reflection model, evaluated in three places: per face (flat), per vertex (Gouraud) and per fragment (Phong). Lower the subdivision level to see where they differ. Companion to notes/07.

flat — per faceGouraud — per vertexPhong — per fragment
What to try

At subdivision level 1 or 2, orbit the light and watch the middle sphere: its highlight jumps between vertices or disappears, because Gouraud shading only evaluates lighting at vertices and interpolates colors between them. Switch between the Phong and Blinn–Phong specular terms at high shininess to compare highlight shapes. The normal-color view shows why the flat sphere needs duplicated vertices.