Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0


Phong shading required interpolation of the surface normals and surface locations across the polygons, so that any polygon would be shaded according to its angular orientation.

Solution Description

For all types of lighting the contribution of the light source to the color was calculated for every channel and then clipped to [0,1] range.

Ambient lighting

Resultant color was a simple combination of object color and the light source color:


Required Image 1, with the light source from the view point:

Simple Cube

Required Image 2, with the light source on its right: