{
 "id": "split-sum-ibl",
 "title": "Split-Sum Image-Based Lighting",
 "aliases": [
  "split sum approximation",
  "prefiltered environment map",
  "PBR IBL"
 ],
 "domain": "gi",
 "subdomain": "environment lighting",
 "stage": "lighting",
 "realtime": "realtime",
 "platforms": [
  "webgl2",
  "webgpu",
  "desktop-gpu",
  "mobile-gpu",
  "unity",
  "unreal",
  "godot"
 ],
 "year_introduced": 2013,
 "inputs": [
  "hdr-image",
  "material-params",
  "gbuffer"
 ],
 "outputs": [
  "radiance"
 ],
 "style": "photoreal",
 "dynamic": "both",
 "summary": "Approximates the specular environment lighting integral as a product of two precomputed terms: a roughness-prefiltered environment cubemap and a 2D lookup table of BRDF scale and bias. Costs two texture reads per pixel.",
 "how_it_works": "Evaluating the full specular integral `integral L(l) f(l, v) cos(theta) dl` per pixel is too slow. The split-sum approximation separates it into two independent sums: the average incoming radiance weighted by the normal distribution, and the average BRDF response with a constant white environment.\n\n**Prefiltered environment map**: an HDR cubemap is convolved offline with a GGX lobe for each roughness level and stored in the mip chain (mip index maps to roughness). The assumption `n = v = r` makes the lookup depend only on the reflection direction and roughness. Importance sampling with a few hundred samples per texel, optionally weighted by `n . l`, builds each mip.\n\n**BRDF integration LUT**: a 2D texture indexed by `n . v` and roughness stores a scale and bias applied to `F0`. It is computed once for the BRDF and is independent of the environment.\n\nAt runtime: `specular = prefilteredColor(r, roughness) * (F0 * A + B)`. Diffuse IBL uses a separate irradiance map or [spherical-harmonics-lighting](spherical-harmonics-lighting).",
 "when_to_use": "Choose it as the default environment reflection and ambient specular in real-time PBR: skylights, studio HDRIs, reflection probes.\n\nPrefer [spherical-harmonics-lighting](spherical-harmonics-lighting) for the diffuse half. Prefer [ltc-area-lights](ltc-area-lights) for local area emitters with proper highlights. Prefer [path-tracing](path-tracing) or screen-space reflections where correct occlusion of the reflection is required, since split-sum environment lookups are unoccluded.",
 "cost": {
  "class": "cheap",
  "notes": "Two texture samples and a few multiplies per pixel; offline prefiltering costs a few hundred milliseconds per environment."
 },
 "failure_modes": [
  "Specular occlusion missing: reflections of the sky appear inside crevices and under objects unless multiplied by an AO or specular-occlusion term",
  "Assuming n = v = r flattens grazing-angle reflections and misses the stretched highlight of real GGX",
  "Seams or aliasing at cubemap mip boundaries when prefiltered filtering is low-quality",
  "Parallax error for local probes unless box-projected or corrected"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "url:https://blog.selfshadow.com/publications/s2013-shading-course",
   "type": "web",
   "title": "Real Shading in Unreal Engine 4",
   "authors": [
    "Brian Karis"
   ],
   "year": null,
   "venue": "SIGGRAPH 2013 Physically Based Shading in Theory and Practice",
   "url": "https://blog.selfshadow.com/publications/s2013-shading-course",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 200,
    "live": true,
    "archive": {
     "url": "http://web.archive.org/web/20261117035647/https://blog.selfshadow.com/publications/s2013-shading-course/",
     "timestamp": "20261117035647"
    },
    "page_title": "SIGGRAPH 2013 Course: Physically Based Shading in Theory and Practice",
    "host": "blog.selfshadow.com",
    "title_confirmed_by_page": false,
    "title_unconfirmed": true
   },
   "provenance": {
    "title": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "http",
     "endpoint": "GET https://blog.selfshadow.com/publications/s2013-shading-course → 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": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "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.15384615384615385,
   "__bib": "karisshading"
  },
  {
   "role": "tutorial",
   "key": "url:https://learnopengl.com/PBR/IBL/Specular-IBL",
   "type": "tutorial",
   "title": "Specular IBL",
   "authors": [
    "Joey de Vries"
   ],
   "year": null,
   "venue": "learnopengl.com",
   "url": "https://learnopengl.com/PBR/IBL/Specular-IBL",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 200,
    "live": true,
    "archive": {
     "url": "http://web.archive.org/web/20261115223619/https://learnopengl.com/PBR/IBL/Specular-IBL",
     "timestamp": "20261115223619"
    },
    "page_title": "LearnOpenGL - Specular IBL",
    "host": "learnopengl.com",
    "title_confirmed_by_page": true,
    "title_unconfirmed": false
   },
   "provenance": {
    "title": {
     "authority": "http",
     "endpoint": "GET https://learnopengl.com/PBR/IBL/Specular-IBL → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "http",
     "endpoint": "GET https://learnopengl.com/PBR/IBL/Specular-IBL → 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/PBR/IBL/Specular-IBL → 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.8,
   "__bib": "vriesspecular"
  }
 ],
 "presets": [
  {
   "id": "split-sum-sphere-grid",
   "title": "Split-sum spheres: roughness vs metalness",
   "runtime": "glsl-fragment",
   "params": {
    "cols": 5,
    "rows": 3
   },
   "code": "// GLSL ES 3.0, Shadertoy-style. Grid of spheres: roughness left to right, metalness bottom to top.\n// Specular uses Karis's analytic EnvBRDFApprox in place of the split-sum LUT; the \"prefiltered\" env is faked\n// by blending the sharp environment toward its blurred average as roughness grows.\nconst float COLS = 5.0;\nconst float ROWS = 3.0;\nvec3 env(vec3 d){\n  vec3 sky = mix(vec3(0.75,0.85,1.0), vec3(0.2,0.4,0.9), clamp(d.y,0.0,1.0));\n  vec3 gnd = vec3(0.25,0.2,0.16);\n  vec3 c = d.y > 0.0 ? sky : gnd;\n  c += vec3(12.0,10.0,7.0) * pow(max(dot(d, normalize(vec3(0.5,0.6,0.6))),0.0), 80.0);\n  return c;\n}\nvec3 envBlur(vec3 d, float r){ return mix(env(d), vec3(0.45,0.5,0.55), r*r*0.8) ; }\nvec3 envBRDFApprox(vec3 spec, float rough, float NoV){\n  const vec4 c0 = vec4(-1.0,-0.0275,-0.572,0.022);\n  const vec4 c1 = vec4(1.0,0.0425,1.04,-0.04);\n  vec4 r = rough*c0 + c1;\n  float a004 = min(r.x*r.x, exp2(-9.28*NoV))*r.x + r.y;\n  vec2 AB = vec2(-1.04,1.04)*a004 + r.zw;\n  return spec*AB.x + AB.y;\n}\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord){\n  vec2 uv = fragCoord / iResolution.xy;\n  vec3 bg = mix(vec3(0.1), vec3(0.2), uv.y);\n  vec2 g = vec2(uv.x*COLS, uv.y*ROWS);\n  vec2 id = floor(g);\n  vec2 p = (fract(g) - 0.5) * 2.0 * 1.12;\n  p.x *= iResolution.x/iResolution.y * ROWS/COLS;\n  if (dot(p,p) > 1.0) { fragColor = vec4(bg,1.0); return; }\n  vec3 n = vec3(p, sqrt(1.0 - dot(p,p)));\n  vec3 v = vec3(0,0,1);\n  float rough = clamp((id.x + 0.5)/COLS, 0.05, 1.0);\n  float metal = id.y/(ROWS-1.0);\n  vec3 base = vec3(0.95,0.64,0.54);\n  vec3 f0 = mix(vec3(0.04), base, metal);\n  vec3 diff = (1.0-metal)*base * env(n)*0.0 ;\n  // irradiance approximated by a very blurred environment\n  diff = (1.0-metal)*base*envBlur(n, 1.0);\n  vec3 r = reflect(-v, n);\n  float NoV = max(dot(n,v), 0.0);\n  vec3 spec = envBlur(r, rough) * envBRDFApprox(f0, rough, NoV);\n  vec3 col = diff + spec;\n  col = col/(1.0+col);\n  fragColor = vec4(pow(col, vec3(1.0/2.2)), 1.0);\n}",
   "basis": "original",
   "license_note": "written for this index; uses the analytic EnvBRDFApprox from Karis's mobile PBR notes in place of the precomputed LUT",
   "execution_fidelity": "conceptual-diagram",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-29",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "split-sum-ibl",
     "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.4358,
      "std": 0.1514,
      "unique_colors": 146
     },
     "image": "/specimens/split-sum-sphere-grid.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "spherical-harmonics-lighting",
  "ltc-area-lights",
  "irradiance-volumes"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [
  {
   "id": "spherical-harmonics-lighting",
   "why": "SH irradiance covers the diffuse term and the prefiltered cubemap covers the specular term of the same environment."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/gi/split-sum-ibl.json"
 },
 "solves": [
  "reflections from an environment map for pbr",
  "realtime image based lighting for glossy surfaces",
  "specular ibl is too expensive per pixel",
  "metals look dull without environment reflections"
 ],
 "authority": "Karis",
 "url": "https://texelatlas.vercel.app/t/split-sum-ibl/",
 "execution_fidelity": "conceptual-diagram",
 "fidelity_label": "Visual Diagram",
 "benchmark_eligible": false,
 "gpu_weight": {
  "weight_x": 1.86,
  "tier": "feather",
  "p50_ms": 0.0613,
  "p95_ms": 0.0648,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 40,
  "preset_id": "split-sum-sphere-grid",
  "execution_fidelity": "conceptual-diagram",
  "fidelity_label": "Visual Diagram",
  "benchmark_eligible": false,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 1.49,
   "tier": "feather",
   "p50_ms": 0.0237,
   "p95_ms": 0.024,
   "speedup_x": 2.59,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 1.17,
   "tier": "feather",
   "p50_ms": 0.0336,
   "p95_ms": 0.0337,
   "speedup_x": 1.82,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}