{
 "id": "blinn-phong-reflection",
 "title": "Phong and Blinn-Phong shading",
 "aliases": [
  "Phong reflection",
  "Blinn-Phong"
 ],
 "domain": "materials",
 "subdomain": "empirical specular model",
 "stage": "material",
 "realtime": "realtime",
 "platforms": [
  "webgl2",
  "webgpu",
  "desktop-gpu",
  "mobile-gpu",
  "cpu",
  "unity",
  "unreal",
  "godot",
  "blender"
 ],
 "year_introduced": 1975,
 "inputs": [
  "normals",
  "material-params"
 ],
 "outputs": [
  "radiance"
 ],
 "style": "both",
 "dynamic": "both",
 "summary": "The classic empirical shading pair: ambient plus Lambert diffuse plus a specular lobe from a cosine raised to a shininess power, using the reflection vector (Phong) or the half vector (Blinn). Cheap, intuitive, not energy conserving.",
 "how_it_works": "Phong computes the mirror direction R of the light about the normal and takes pow(max(dot(R, V), 0), s) as the specular term, where V points to the viewer and s is a shininess exponent. Blinn replaced R with the half vector H = normalize(L + V) and used pow(max(dot(N, H), 0), s'). That avoids a reflect() call, stays well behaved when the light and eye are far from the normal, and gives a rounder highlight at grazing angles; matching Phong's width needs roughly s' = 4s. The final colour is ka + kd*max(dot(N,L),0) + ks*spec, each scaled by light colour. Nothing links the exponent to physical roughness, there is no Fresnel term and no normalisation, so brightness changes as the highlight narrows. Normalised variants multiply the lobe by (s+8)/(8*pi) to restore energy balance, which is the usual bridge to microfacet models.",
 "when_to_use": "Choose it for prototypes, teaching, low-end mobile, retro or stylised looks and any place a designer wants a direct 'shininess' dial. Prefer `cook-torrance-brdf` with `ggx-trowbridge-reitz` when assets need consistent response under many lights or image-based lighting. Prefer `disney-principled-brdf` when artists should author roughness/metalness. For toon looks start from the diffuse and specular thresholds in `toon-shading`.",
 "cost": {
  "class": "cheap",
  "notes": "A handful of dot products and one pow per light."
 },
 "failure_modes": [
  "Highlights do not narrow with energy conservation, so shiny surfaces look too dim and rough ones too bright",
  "No Fresnel, so grazing-angle reflections never strengthen and edges look plastic",
  "Phong's R.V term goes to zero beyond 90 degrees and produces a visible cut-off on the lit side of the terminator",
  "Blinn highlights are elliptical on flat planes at grazing view angles, unlike Phong's circular spot",
  "Exponent has no physical mapping, so values cannot be reused across lighting setups or ported to PBR"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1145/965141.563893",
   "type": "paper",
   "title": "Models of light reflection for computer synthesized pictures",
   "authors": [
    "James F. Blinn"
   ],
   "year": 1977,
   "venue": "ACM SIGGRAPH Computer Graphics",
   "url": "https://doi.org/10.1145/965141.563893",
   "ids": {
    "doi": "10.1145/965141.563893"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/965141.563893",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/965141.563893",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/965141.563893",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/965141.563893",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/965141.563893",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "blinn1977models"
  },
  {
   "role": "primary",
   "key": "doi:10.1145/360825.360839",
   "type": "paper",
   "title": "Illumination for computer generated pictures",
   "authors": [
    "Bui Tuong Phong"
   ],
   "year": 1975,
   "venue": "Communications of the ACM",
   "url": "https://doi.org/10.1145/360825.360839",
   "ids": {
    "doi": "10.1145/360825.360839"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/360825.360839",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/360825.360839",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/360825.360839",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/360825.360839",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1145/360825.360839",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "phong1975illumination"
  },
  {
   "role": "tutorial",
   "key": "url:https://learnopengl.com/Advanced-Lighting/Advanced-Lighting",
   "type": "tutorial",
   "title": "Advanced Lighting",
   "authors": [
    "Joey de Vries"
   ],
   "year": null,
   "venue": "learnopengl.com",
   "url": "https://learnopengl.com/Advanced-Lighting/Advanced-Lighting",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 200,
    "live": true,
    "archive": {
     "url": "http://web.archive.org/web/20261012110935/https://learnopengl.com/Advanced-Lighting/Advanced-Lighting",
     "timestamp": "20261012110935"
    },
    "page_title": "LearnOpenGL - Advanced Lighting",
    "host": "learnopengl.com",
    "title_confirmed_by_page": true,
    "title_unconfirmed": false
   },
   "provenance": {
    "title": {
     "authority": "http",
     "endpoint": "GET https://learnopengl.com/Advanced-Lighting/Advanced-Lighting → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "http",
     "endpoint": "GET https://learnopengl.com/Advanced-Lighting/Advanced-Lighting → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "http",
     "endpoint": "GET https://learnopengl.com/Advanced-Lighting/Advanced-Lighting → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 0.95,
   "__bib": "vriesadvanced"
  }
 ],
 "presets": [
  {
   "id": "blinn-phong-sphere",
   "title": "Blinn-Phong lit sphere",
   "runtime": "glsl-fragment",
   "params": {
    "SHININESS": 64,
    "KS": 0.8
   },
   "code": "// GLSL ES 3.0, Shadertoy-style. Blinn-Phong on an analytic sphere.\nconst float SHININESS = 64.0;\nconst float KS = 0.8;\nconst vec3 ALBEDO = vec3(0.7, 0.2, 0.15);\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n    vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;\n    vec3 ro = vec3(0.0, 0.0, 3.0);\n    vec3 rd = normalize(vec3(uv, -1.5));\n    vec3 col = vec3(0.04, 0.05, 0.08) + 0.12 * (uv.y + 0.5);\n    float b = dot(ro, rd);\n    float h = b * b - (dot(ro, ro) - 1.0);\n    if (h > 0.0) {\n        vec3 p = ro + rd * (-b - sqrt(h));\n        vec3 n = normalize(p);\n        vec3 l = normalize(vec3(cos(iTime), 0.6, 0.8));\n        vec3 v = -rd;\n        vec3 hv = normalize(l + v);\n        float nl = max(dot(n, l), 0.0);\n        float spec = pow(max(dot(n, hv), 0.0), SHININESS) * step(0.0, dot(n, l));\n        col = ALBEDO * (0.08 + nl) + KS * spec;\n    }\n    fragColor = vec4(pow(col, vec3(1.0 / 2.2)), 1.0);\n}",
   "basis": "original",
   "license_note": "written for this index",
   "execution_fidelity": "faithful-pass",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-29",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "blinn-phong-reflection",
     "runtime": "glsl-fragment",
     "checked_at": "2026-11-29T15:51:50.471Z",
     "renderer": "Chromium 145.0.7632.6 headless, WebGL2 via ANGLE/SwiftShader, 512×512, iTime=1.5",
     "stats": {
      "mean": 0.4736,
      "std": 0.1312,
      "unique_colors": 111
     },
     "image": "/specimens/blinn-phong-sphere.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "cook-torrance-brdf",
  "ggx-trowbridge-reitz",
  "oren-nayar",
  "toon-shading",
  "fresnel-schlick-approximation"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [
  {
   "id": "normal-mapping-mikktspace",
   "why": "Normal maps perturb N before the dot products, giving cheap surface detail under the same lighting equation."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/materials/blinn-phong-reflection.json"
 },
 "solves": [
  "need a simple specular highlight without pbr",
  "shiny plastic look on a low-end mobile shader",
  "want a shininess slider artists understand",
  "highlight looks wrong at grazing angles with reflect vector",
  "prototyping lighting quickly in a toy renderer"
 ],
 "authority": "Blinn, 1977",
 "url": "https://texelatlas.vercel.app/t/blinn-phong-reflection/",
 "execution_fidelity": "faithful-pass",
 "fidelity_label": "Faithful Pass",
 "benchmark_eligible": true,
 "gpu_weight": {
  "weight_x": 1.09,
  "tier": "feather",
  "p50_ms": 0.0359,
  "p95_ms": 0.0384,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 40,
  "preset_id": "blinn-phong-sphere",
  "execution_fidelity": "faithful-pass",
  "fidelity_label": "Faithful Pass",
  "benchmark_eligible": true,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 0.98,
   "tier": "feather",
   "p50_ms": 0.0156,
   "p95_ms": 0.0159,
   "speedup_x": 2.3,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 1,
   "tier": "feather",
   "p50_ms": 0.0288,
   "p95_ms": 0.0288,
   "speedup_x": 1.25,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}