Skip to content
CoreSource checked

Blinn-Phong Shading

Approximates specular highlights with a halfway vector between light and view directions.

Quick Facts

Compact metadata for implementation and discovery.

Category
Rendering
Difficulty
Beginner
Family
Local Illumination
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
4
Code example
Ready
Visualization
Ready

Overview

Blinn-Phong shading computes diffuse light and a specular term from the normal's alignment with the halfway vector. It is a compact local illumination model for real-time rendering.

Core Concepts

halfway vectorspecular exponentdiffuse termlocal lighting

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(1)

Average

O(pixels * lights)

Worst

O(pixels * lights)

Space

O(1)

When to Use

  • Use when a simple real-time highlight model is enough.
  • Use when physically based material accuracy is not required.

When Not to Use

  • Avoid when energy conservation or measured material response matters.
  • Avoid when image-based lighting and microfacet behavior are required.

What It Does

  • Computes a light direction, view direction, and halfway vector
  • Evaluates diffuse and specular terms
  • Combines material color with local light contribution

Use Cases

  • Real-time non-physical highlights
  • Simple material previews
  • Teaching local illumination models

Inputs

  • Scene geometry
  • Materials
  • Camera and lighting state

Outputs

  • Rendered image
  • Visibility or shading buffers

Key Formulas (1)

Blinn-Phong specular

specular = max(dot(N, H), 0)shininess
specular = max(dot(N, H), 0)^shininess

Computes highlight strength from the normal and halfway vector.

Pseudocode

  1. 1.Normalize N, L, and V
  2. 2.Compute H = normalize(L + V)
  3. 3.Compute diffuse = max(dot(N, L), 0)
  4. 4.Compute specular = max(dot(N, H), 0)^shininess
  5. 5.Combine ambient, diffuse, and specular material terms

Canonical Example

Input
normal N, light direction L, view direction V, shininess 32
Output
diffuse plus specular color contribution
Explanation
The specular term increases when N aligns with normalize(L + V).

Implementation Notes

  • Normalize normal, light, view, and halfway vectors.
  • Clamp dot products before exponentiation.
  • Test with one light and one sphere before complex scenes.

Common Pitfalls

  • Normals, light vectors, and view vectors must be in the same space.
  • Unnormalized vectors produce incorrect highlight size and intensity.
  • The shininess exponent is artistic, not a physical roughness value.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

Show rays, samples, buffers, or shading terms that contribute to the final pixel.

Blinn-Phong Shading mechanism walkthrough step 1 of 5
Step 1 of 5: Normalize N, L, and V
rendering-mechanism

Notes

Blinn-Phong is useful for simple highlights, but it is not a physically based BRDF.

Sources (1)

What each reference supports for this entry.

Blinn 1977

Paper

Foundational paper introducing the halfway-vector modification used by Blinn-Phong shading.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Alternative toCook-Torrance Shading

Blinn-Phong is simpler and less physically based than Cook-Torrance.

Variant ofPhong Shading

Blinn-Phong is a practical variant of Phong-style shading.

Tags

GraphicsShadingLightingClassic