| |||||||||
The Phong reflection model is a shading model, used heavily in 3D computer graphics for assigning shades to each individual pixel that is rasterized of some abstract representation of an object such as a sphere or cone.
The Phong reflection model is a simplification of the more general rendering equation, which takes advantage of the following simplifications when deciding the shade of a pixel during rasterization of a surface:
If we first define, for each light source in the scene to be rendered, the components <math>i_s, i_d<math> and <math>i_{al}<math> where these are the intensities (often as RGB values) of the specular, diffuse and ambient components of the light sources respectively. The local <math>i_{al}<math> term will be added to all the ambient terms of all other light sources to create a global <math>i_a<math> term. (This term may also have a global bias.)
If we then define, for each material (which is typically assigned 1 to 1 for the objects in the scene, so that it is a sphere of material 1, which is a material which looks like e.g. copper, a cone of material 2, which is a material which looks like brass etc:
We further define <math>lights<math> as the set of all light sources, <math>L<math> is the direction vector from each light source toward the point on the surface, <math>N<math> is the frame buffer memory simultaneously.)