Phong Shading Computer Graphics

Phong shading is a more accurate interpolation-based approach that can be used for rendering a polygon. It was developed by Phong Bui Tuong.It improves upon the Gourand Shading and provides a better approximation of the shading of any smooth surface. It interpolates the normal vector instead of the intensity values.

Surface rendering is done with the help of Phong shading in the following manner:

  • Determine the average unit normal vector at each polygon vertex.

              So, for n polygons => summation of Ni/ | summation of Ni | (where i is initialized from 1 to N)

  • Linearly interpolate the vertex normal over the surfaces of the polygon.   N= (y-y2)/(y1-y2) N1 + (y1-y)/(y1-y2) N2

Interpolation of the surface normal

                                                      

  • By applying the illumination model along each scan we have to determine the projected pixel intensities of the surface points.

Advantages:

  1. Some dark and bright intensity streaks known as mach bands appear on the surface due to the linear intensity interpolation, this method reduces the mach band effects and displays more realistic highlights.
  2. It is more accurate as compared to the Gourand Shading.

Disadvantages:

  1. It is slower as compared to the Gourand Shading.
  2. It requires more calculation, hence it increases the cost of shading at each successive step.