Skip to main content

Fast Phong shading

Short answer

Fast Phong approximates normal Phong by expanding the per-pixel intensity formula (with interpolated unnormalized normals) as a Taylor series up to second degree in x,y, then evaluates incrementally using forward differences. Advantages: no per-pixel square root, division or exponentiation; runs about twice as fast as Gouraud versus six-seven times for Phong with nearly identical quality.

Explain Fast Phong shading model with relevant expression. Mention the advantages of fast Phong shading over Phong shading.

Fast Phong shading is an approximation of Phong shading that avoids the expensive per-pixel normalisation and power calculation.

In normal Phong shading, the interpolated normal N must be normalised at every pixel (a square root and a division), and (N·H)^n must be computed. Fast Phong shading reduces this work.

Idea. Over a triangle, the interpolated (unnormalised) normal is a linear function of the screen position:

N = Ax + By + C

where the vectors A, B, C are found from the three vertex normals. For a distant light (L constant), the diffuse term becomes

I_diff = (N·L)/(|L||N|) = (ax + by + c) / √(dx² + exy + fy² + gx + hy + i)

where the constants a, b, …, i stand for the various dot products of A, B, C and L. The method then uses:

  1. Taylor series expansion of this expression, keeping terms up to the second degree in x and y. This removes the per-pixel square root and division:

    I_diff ≈ T5·x² + T4·xy + T3·y² + T2·x + T1·y + T0

    The specular term is approximated in the same way.

  2. Incremental (forward-difference) evaluation: along a scan line, I(x + 1) = I(x) + ΔI and ΔI(x + 1) = ΔI(x) + Δ²I, so each pixel costs only two additions.

Advantages over Phong shading

  • Much faster, with no per-pixel square root, division or exponentiation. Fast Phong takes about twice as long as Gouraud shading, while normal Phong takes about six to seven times as long.
  • Nearly the same image quality (good highlights).
  • Less computation, so it is suitable for hardware.

Limitation: approximation errors can appear if the polygon is large or the normals change quickly across it (especially for large n).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 8 questions →