Rendering

The Phong Reflection Model in Computer Graphics

How the Phong reflection model combines ambient, diffuse and specular light, what each term and the shininess exponent do, and how it differs from Phong shading and Blinn-Phong.

On this page
  1. What is the Phong reflection model?
  2. The three components
  3. The full Phong equation
  4. How the shininess exponent changes a surface
  5. Phong shading vs Gouraud shading vs flat shading
  6. Blinn-Phong: the common variant
  7. A minimal shader implementation
  8. Limitations and why PBR replaced it
  9. Where you still see Phong today

What is the Phong reflection model?

The Phong reflection model is a simple, empirical formula for how much light a point on a surface reflects towards the viewer. It splits that light into three parts: a constant ambient term, a diffuse term for matte scattering, and a specular term for shiny highlights. Bui Tuong Phong described it in 1975 while working at the University of Utah, and it became the standard lighting model in real-time graphics for decades.

“Empirical” is the key word. Phong doesn’t simulate the physics of light; it’s a convenient approximation that looks plausible and is cheap to calculate. That’s exactly why it was so widely used, and why it’s still the first lighting model most graphics students learn.

What is “Phong”? In computer graphics, the name refers to two related ideas from Phong’s work: the reflection model described here, and Phong shading, a method of interpolating surface normals across a polygon. We cover the difference further down.

The three components

Every term uses a few vectors at the surface point being lit, all normalised to length 1:

  • N: the surface normal, pointing straight out of the surface.
  • L: the direction from the point towards the light.
  • V: the direction from the point towards the viewer (camera).
  • R: the direction a perfect mirror would reflect the light, calculated as R = 2(N·L)N − L.

Ambient

I_ambient = k_a * i_a

Ambient light is a flat, constant amount added everywhere, standing in for all the light that bounces around a real scene. k_a is the material’s ambient reflectivity and i_a the ambient light intensity. Without it, any surface facing away from a light would be pitch black. With too much of it, the scene looks flat and washed out.

Diffuse

I_diffuse = k_d * (N · L) * i_d

Diffuse reflection models matte surfaces like chalk or unpolished wood, which scatter light equally in all directions. It follows Lambert’s cosine law: brightness depends on the cosine of the angle between the normal and the light direction, which is the dot product N·L. A surface facing the light directly is brightest; one at a grazing angle is dim. Negative values (light behind the surface) are clamped to zero. Because diffuse light scatters evenly, it doesn’t depend on where the viewer stands.

Specular

I_specular = k_s * (R · V)^α * i_s

The specular term creates the bright highlight you see on shiny objects. It’s strongest when the viewer looks along the mirror-reflection direction R, so the highlight moves as the camera moves. The exponent α (alpha, often called shininess) controls how tight the highlight is. Again, negative dot products are clamped to zero.

The full Phong equation

Adding the terms, and summing diffuse and specular over every light in the scene:

I = k_a * i_a + Σ_lights [ k_d * max(N · L, 0) * i_d + k_s * max(R · V, 0)^α * i_s ]

Where:

Symbol Meaning
k_a, k_d, k_s Material’s ambient, diffuse and specular reflection coefficients (often RGB colours)
i_a Ambient light intensity
i_d, i_s Diffuse and specular intensity of each light
α Shininess exponent
N, L, R, V Normal, light, reflection and view vectors

In practice, the diffuse coefficient is usually the object’s base colour, and the specular coefficient is often white or grey, which makes highlights look like the light’s colour. Many implementations also multiply each light’s contribution by a distance attenuation factor.

How the shininess exponent changes a surface

The exponent α has a big visual effect:

  • Low values (around 1–10): wide, soft highlights, like rubber or matte plastic.
  • Medium values (around 20–100): a defined highlight, like painted or plastic surfaces.
  • High values (several hundred or more): a small, sharp highlight, like polished metal or glass.

These ranges are rough guides rather than standards; the right value depends on the look you want and the scale of your scene.

Phong shading vs Gouraud shading vs flat shading

The reflection model tells you how to light a point. A separate question is where you evaluate it on a polygon mesh. This is what “surface rendering” or “shading methods” usually means in graphics courses:

  • Flat shading calculates lighting once per polygon and fills the whole face with that colour. It’s cheap but looks faceted.
  • Gouraud shading (Henri Gouraud, 1971) calculates lighting at each vertex and interpolates the colours across the polygon. It’s smooth and cheap, but highlights that fall in the middle of a face can be missed or smeared.
  • Phong shading interpolates the normals across the polygon, then calculates lighting at every pixel. It costs more but produces smooth, accurate highlights.

So you can use the Phong reflection model with Gouraud shading, which is what many older fixed-function pipelines effectively did, or with Phong shading, which is standard in modern per-pixel shaders.

Blinn-Phong: the common variant

In 1977 Jim Blinn proposed a modification that became even more widespread. Instead of the reflection vector R, it uses the half vector H, halfway between the light and view directions:

H = normalize(L + V)
I_specular = k_s * max(N · H, 0)^α' * i_s

Blinn-Phong is cheaper in some situations and behaves better at grazing angles, where original Phong highlights can cut off abruptly. It also tends to match real highlights a little more closely. Note that for a similar-looking highlight, Blinn-Phong needs a higher exponent than Phong; a factor of roughly two to four is often quoted. Blinn-Phong was the basis of the fixed-function lighting in classic OpenGL and Direct3D.

A minimal shader implementation

Here’s a compact GLSL fragment shader using the Phong model per pixel, for a single light:

uniform vec3 lightPos;
uniform vec3 viewPos;
uniform vec3 lightColor;
uniform vec3 objectColor;
uniform float ka;        // ambient strength
uniform float ks;        // specular strength
uniform float shininess; // alpha

in vec3 FragPos;
in vec3 Normal;
out vec4 FragColor;

void main() {
    vec3 N = normalize(Normal);
    vec3 L = normalize(lightPos - FragPos);
    vec3 V = normalize(viewPos - FragPos);
    vec3 R = reflect(-L, N);

    vec3 ambient  = ka * lightColor;
    vec3 diffuse  = max(dot(N, L), 0.0) * lightColor;
    vec3 specular = ks * pow(max(dot(R, V), 0.0), shininess) * lightColor;

    FragColor = vec4((ambient + diffuse) * objectColor + specular, 1.0);
}

To switch to Blinn-Phong, replace the reflection vector with vec3 H = normalize(L + V); and use dot(N, H) in the specular term.

Limitations and why PBR replaced it

Phong served graphics well, but it has known shortcomings:

  • Not energy-conserving. A surface can reflect more light than it receives, especially if you raise the specular and diffuse coefficients together.
  • The “plastic” look. Highlights tend to look the same on every material, which is why early CG often looked like shiny plastic.
  • No Fresnel effect. Real surfaces become more reflective at grazing angles; basic Phong ignores this.
  • Ambient is a crude stand-in for indirect light, with no shadowing or colour bleeding.
  • Parameters aren’t physically meaningful, so materials don’t look consistent under different lighting.

Modern engines and renderers use physically based rendering (PBR) models instead, such as microfacet BRDFs like Cook-Torrance with a GGX distribution. Blender’s Principled BSDF, Unreal Engine’s material system and Unity’s standard shaders all work this way. Their inputs, such as base colour, roughness and metallic (PBR texture maps), map more directly to real materials. For how Phong fits into the bigger picture of lighting models, see our article on illumination models in computer graphics.

Where you still see Phong today

  • Teaching. It’s the clearest introduction to how light, normals and view direction interact.
  • Stylized and low-cost rendering, such as mobile games, simple visualizations and retro looks.
  • Legacy file formats and tools. The OBJ/MTL format, for example, describes materials with Phong-style ambient, diffuse, specular and shininess values.
  • As a building block. The idea of splitting light into diffuse and specular parts survives in every modern shading model.

If you want to see how lighting models fit into the larger rendering pipeline, from rasterization to path tracing, see our guide to ray tracing vs rasterization.

The complete guide to rendering

3D Rendering Software: The Best Rendering Tools Compared
Read the guide

Keep exploring

Guides from other topics

All topics →