Skip to content
Part IA Michaelmas Term

Phong Reflection Model

The Phong Model

The complete Phong shading model combines three reflection components:

I=Iaka+lightsIlkdmax(0,NL)+lightsIlksmax(0,RV)nI = I_a k_a + \sum_{\text{lights}} I_l k_d \max(0, \mathbf{N} \cdot \mathbf{L}) + \sum_{\text{lights}} I_l k_s \max(0, \mathbf{R} \cdot \mathbf{V})^n

Components

ComponentTermProperties
AmbientIakaI_a k_aConstant; approximates indirect illumination
DiffuseIlkd(NL)I_l k_d (\mathbf{N} \cdot \mathbf{L})View-independent; Lambertian reflection
SpecularIlks(RV)nI_l k_s (\mathbf{R} \cdot \mathbf{V})^nView-dependent; creates highlights

Symbols

SymbolMeaning
ka,kd,ksk_a, k_d, k_sReflection coefficients
Ia,IlI_a, I_lAmbient and light intensities
N\mathbf{N}Surface normal (unit vector)
L\mathbf{L}Direction to light (unit vector)
R\mathbf{R}Perfect reflection direction
V\mathbf{V}Direction to viewer (unit vector)
nnPhong exponent (shininess)

Reflection Direction

R=2(LN)NL\mathbf{R} = 2(\mathbf{L} \cdot \mathbf{N})\mathbf{N} - \mathbf{L}

Or equivalently: R=2cosθNL\mathbf{R} = 2\cos\theta \mathbf{N} - \mathbf{L}

Phong shading geometry showing N, L, R, V, and α

Per-Channel Computation

The shading equation is computed for each RGB channel separately:

  • Different kdk_d values for each channel give surface colour
  • Specular highlights often use light colour (white for plastics)

Clamping

  • max(0,)\max(0, \cdot) prevents negative contributions (light behind surface)
  • Without clamping, surfaces can become incorrectly dark

Summary

  • Phong shading = ambient + diffuse + specular
  • Ambient approximates global illumination
  • Diffuse is view-independent (Lambertian)
  • Specular is view-dependent (highlights)
  • The max(0,)\max(0, \cdot) prevents negative values from light behind surfaces