{
 "id": "physical-light-units-and-exposure",
 "title": "Physical light units, photometry and camera exposure",
 "aliases": [
  "EV100 exposure",
  "photometric units",
  "lux and lumen lighting",
  "physically based camera"
 ],
 "domain": "gi",
 "subdomain": "lighting units",
 "stage": "lighting",
 "realtime": "realtime",
 "platforms": [
  "webgl2",
  "webgpu",
  "desktop-gpu",
  "unity",
  "unreal",
  "godot",
  "blender"
 ],
 "year_introduced": 2014,
 "inputs": [
  "radiance",
  "material-params"
 ],
 "outputs": [
  "hdr-image"
 ],
 "style": "photoreal",
 "dynamic": "both",
 "summary": "Author lights in photometric units (lux, lumens, candela, nits) and convert scene radiance to display values with an exposure derived from aperture, shutter and ISO, so lighting stays consistent across sun, lamps and screens.",
 "how_it_works": "Photometric lighting specifies each source with a measured quantity: illuminance in lux for the sun, luminous power in lumens or intensity in candela for lamps, luminance in nits for emissive surfaces. A Lambertian surface with albedo `a` under illuminance `E` has outgoing luminance `a * E / pi`, so these numbers drive shading directly and an overcast day, a living room and a night street come out at plausible ratios.\n\nThe frame buffer stores scene-referred luminance, which spans many orders of magnitude, so a virtual camera is applied before tonemapping. Exposure value is `EV100 = log2(N^2 / t * 100 / S)` for aperture N, shutter t and ISO S; a saturation-based convention divides luminance by `1.2 * 2^EV100`, and mid-grey ends up near 0.18 when EV matches the scene. Auto exposure ([auto-exposure-histogram](auto-exposure-histogram)) picks the EV from the image.\n\nGood practice is to keep lights in physical units, set one exposure value, and apply tonemapping afterwards, as described in the Frostbite PBR course notes; glTF's punctual-light extension fixes lux and candela as the exchange units.",
 "when_to_use": "Choose it whenever more than one light type shares a scene, when scenes must be relit at different times of day, or when you need artist-friendly camera controls (aperture, shutter, ISO) that behave like photography.\n\nPrefer [auto-exposure-histogram](auto-exposure-histogram) to drive the EV automatically on top of physical units rather than replacing them. Prefer [agx-tonemapping](agx-tonemapping), [aces-tonemapping](aces-tonemapping) or [khronos-pbr-neutral](khronos-pbr-neutral) for the display transform applied after exposure. Skip full photometry for stylised or UI-lit scenes where unitless intensities are fine; see [toon-shading](toon-shading).",
 "cost": {
  "class": "cheap",
  "notes": "Only a multiplier and unit conversions per light; the cost is pipeline discipline, not runtime."
 },
 "failure_modes": [
  "Mixing unitless and photometric lights gives sun and lamps wildly different relative brightness",
  "Half-float buffers overflow with sun-level luminance unless exposure is pre-applied in the lighting pass",
  "Lumens to candela conversion forgotten for spot lights (the cone solid angle must be taken into account)",
  "Exposure jumps when moving between bright and dark areas appear as flicker if adaptation is not smoothed",
  "Emissive materials authored in 0 to 1 look black next to a 100000 lux sun",
  "Bloom thresholds expressed in unexposed units fire everywhere or nowhere"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "url:https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf",
   "type": "web",
   "title": "Moving Frostbite to Physically Based Rendering",
   "authors": [
    "Sébastien Lagarde",
    "Charles de Rousiers"
   ],
   "year": null,
   "venue": "SIGGRAPH 2014 course",
   "url": "https://seblagarde.wordpress.com/wp-content/uploads/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 200,
    "live": true,
    "archive": null,
    "page_title": null,
    "host": "seblagarde.wordpress.com",
    "title_confirmed_by_page": false,
    "title_unconfirmed": false
   },
   "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://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf → 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": null,
   "__bib": "lagardemoving"
  },
  {
   "role": "primary",
   "key": "url:https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_lights_punctual",
   "type": "web",
   "title": "KHR_lights_punctual",
   "authors": [],
   "year": null,
   "venue": "github.com",
   "url": "https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_lights_punctual",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 200,
    "live": true,
    "archive": {
     "url": "http://web.archive.org/web/20260925141135/https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_lights_punctual",
     "timestamp": "20260925141135"
    },
    "page_title": "glTF/extensions/2.0/Khronos/KHR_lights_punctual at main · KhronosGroup/glTF",
    "host": "github.com",
    "title_confirmed_by_page": true,
    "title_unconfirmed": false
   },
   "provenance": {
    "title": {
     "authority": "http",
     "endpoint": "GET https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_lights_punctual → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "http",
     "endpoint": "GET https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_lights_punctual → 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://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_lights_punctual → 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": "anonlights"
  },
  {
   "role": "tutorial",
   "key": "url:https://google.github.io/filament/Filament.html",
   "type": "tutorial",
   "title": "Filament: Physically based rendering (image based lights section)",
   "authors": [
    "Romain Guy",
    "Mathias Agopian"
   ],
   "year": null,
   "venue": "google.github.io",
   "url": "https://google.github.io/filament/Filament.html",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 200,
    "live": true,
    "archive": {
     "url": "http://web.archive.org/web/20261105144234/https://google.github.io/filament/Filament.html",
     "timestamp": "20261105144234"
    },
    "page_title": "Redirecting...",
    "host": "google.github.io",
    "title_confirmed_by_page": false,
    "title_unconfirmed": false
   },
   "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://google.github.io/filament/Filament.html → 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://google.github.io/filament/Filament.html → 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,
   "__bib": "guyfilament"
  }
 ],
 "presets": [
  {
   "id": "exposure-ladder-ev100",
   "title": "Sunlit grey sphere across EV100 11 to 19",
   "runtime": "glsl-fragment",
   "params": {
    "sun_lux": 100000,
    "albedo": 0.18,
    "ev_first": 11,
    "columns": 9
   },
   "code": "// Exposure ladder: one sunlit sphere rendered at EV100 = 11..19 (scene-referred luminance, then camera exposure).\nconst float SUN_LUX = 100000.0;   // clear-day sun illuminance\nconst float ALBEDO = 0.18;        // grey card\nconst float EV_FIRST = 11.0;\nconst float COLS = 9.0;\n\nvec3 aces(vec3 x) { return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0); }\n\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n  vec2 uv = fragCoord / iResolution.xy;\n  float cell = floor(uv.x * COLS);\n  vec2 p = vec2(fract(uv.x * COLS) - 0.5, (uv.y - 0.55) * COLS * iResolution.y / iResolution.x * 1.0);\n  float ev100 = EV_FIRST + cell;\n  float exposure = 1.0 / (1.2 * exp2(ev100));          // saturation-based exposure\n  vec3 L = normalize(vec3(-0.5, 0.6, 0.6));\n  float r2 = dot(p, p);\n  vec3 radiance;\n  if (r2 < 0.2) {\n    vec3 n = vec3(p, sqrt(0.2 - r2) / sqrt(0.2));\n    n = normalize(vec3(p / sqrt(0.2), n.z));\n    float ndl = max(dot(n, L), 0.0);\n    vec3 sky = vec3(0.35, 0.5, 0.8) * 12000.0 * (0.5 + 0.5 * n.y);   // sky illuminance in lux\n    radiance = ALBEDO / 3.14159 * (SUN_LUX * ndl * vec3(1.0, 0.96, 0.9) + sky);\n  } else {\n    float g = 0.5 + 0.5 * uv.y;\n    radiance = vec3(0.30, 0.45, 0.70) * 2500.0 * g;                  // bright sky background, cd/m^2\n  }\n  vec3 c = aces(radiance * exposure);\n  c *= 0.6 + 0.4 * smoothstep(0.0, 0.01, abs(fract(uv.x * COLS) - 0.5) * -1.0 + 0.5);\n  fragColor = vec4(pow(c, vec3(1.0 / 2.2)), 1.0);\n}\n",
   "basis": "original",
   "license_note": "written for this index",
   "execution_fidelity": "reduced-sandbox",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-29",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "physical-light-units-and-exposure",
     "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.2386,
      "std": 0.2367,
      "unique_colors": 191
     },
     "image": "/specimens/exposure-ladder-ev100.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "frostbite-pbr",
  "auto-exposure-histogram",
  "aces-tonemapping",
  "agx-tonemapping",
  "khronos-pbr-neutral",
  "hable-filmic-tonemapping"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [
  {
   "id": "auto-exposure-histogram",
   "why": "Photometric luminance goes in; the histogram metering chooses the EV100 that scales it into display range."
  },
  {
   "id": "agx-tonemapping",
   "why": "Exposed scene-referred values are the input to the display transform; getting units right first avoids tuning the tonemapper to hide lighting errors."
  },
  {
   "id": "ltc-area-lights",
   "why": "Area emitters specified in nits or lumens integrate to the same physical radiance as punctual lights when units are consistent."
  }
 ],
 "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/physical-light-units-and-exposure.json"
 },
 "solves": [
  "sun and lamps have inconsistent relative brightness",
  "want camera-like aperture shutter and iso controls",
  "scene is blown out or black after changing lights",
  "how to set light intensity in real world units"
 ],
 "authority": "Lagarde & Rousiers",
 "url": "https://texelatlas.vercel.app/t/physical-light-units-and-exposure/",
 "execution_fidelity": "reduced-sandbox",
 "fidelity_label": "Analytic Sandbox",
 "benchmark_eligible": true,
 "gpu_weight": {
  "weight_x": 1.32,
  "tier": "feather",
  "p50_ms": 0.0433,
  "p95_ms": 0.0448,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 40,
  "preset_id": "exposure-ladder-ev100",
  "execution_fidelity": "reduced-sandbox",
  "fidelity_label": "Analytic Sandbox",
  "benchmark_eligible": true,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 1.15,
   "tier": "feather",
   "p50_ms": 0.0183,
   "p95_ms": 0.0184,
   "speedup_x": 2.37,
   "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.5,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}