---
id: "irradiance-volumes"
title: "Irradiance Volumes and Light Probes"
aliases: [light probes, ambient cubes, probe grids]
domain: "gi"
stage: "lighting"
realtime: "realtime"
platforms: [webgl2, webgpu, desktop-gpu, mobile-gpu, unity, unreal, godot]
year_introduced: 1998
inputs: [irradiance-probes, mesh]
outputs: [irradiance-probes]
style: "photoreal"
dynamic: "both"
cost: "cheap"
authority: "Greger et al., 1998"
url: "https://texelatlas.vercel.app/t/irradiance-volumes/"
sources_verified_at: "2026-11-29"
---
# Irradiance Volumes and Light Probes (Greger et al., 1998)

> Stores precomputed irradiance at points in space (often as low-order spherical harmonics) and interpolates between them to light moving objects with indirect light consistent with the baked environment.

## Reach for it when

- dynamic characters look unlit in baked scenes
- moving props don't pick up indirect light
- need bounce light on objects without lightmaps
- fog and particles need indirect lighting in baked levels

## How it works

A light probe records how much light arrives at a point from each direction, compressed into a handful of coefficients, usually L1 or L2 [spherical-harmonics-lighting](spherical-harmonics-lighting) or a six-sided **ambient cube**. Probes are placed on a regular grid, on an adaptive tetrahedral mesh, or by hand near interesting lighting changes.

Baking computes each probe's radiance from a skyline and scene capture (or an offline [path-tracing](path-tracing) of the neighbourhood) and projects it into the basis. At runtime an object finds the probes surrounding it, interpolates their coefficients (trilinearly in a grid, barycentrically in a tetrahedralization), and evaluates the irradiance for its normal in the shader. Because only a few numbers per probe are needed, thousands fit in a small buffer.

Common refinements: visibility-aware interpolation to prevent probes on the wrong side of a wall from contributing, **adaptive probe volumes** that subdivide where lighting varies, and runtime-updated probes ([ddgi](ddgi)) for dynamic GI.

## When to use it

Choose it for lighting dynamic characters and props in baked scenes, and for adding indirect light to volumes (fog, particles) where lightmaps cannot go.

Prefer [lightmap-baking](lightmap-baking) for large static surfaces where per-texel detail is needed. Prefer [ddgi](ddgi) when the probes must update at runtime. Prefer [precomputed-radiance-transfer](precomputed-radiance-transfer) when objects need self-shadowing under changing low-frequency light. Prefer [spherical-harmonics-lighting](spherical-harmonics-lighting) alone when a single global environment is enough.

## Cost

cheap — Per-pixel cost is interpolating a few coefficient sets; memory and bake time scale with probe count.
Measured GPU Weight: 25.92× baseline (heavy) — 0.814 ms median / 0.8577 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 26.59× baseline (heavy) — 0.4201 ms median (1.94× faster on L4).
Ampere A100 scaling: 17.17× baseline (moderate) — 0.4945 ms median (1.65× faster on A100).

## Failure modes

- Light leaking when interpolation mixes probes separated by a wall
- Low-order SH gives soft, low-contrast lighting that cannot represent sharp shadows or strong directional light, and can ring (negative lobes)
- Pop or discontinuity when an object switches tetrahedron or crosses a probe-volume boundary
- Probe placement inside geometry produces black or wrong probes unless invalid ones are detected and filled

## Engine support

- blender: builtin — `Add > Light Probe > Volume, then Bake Light Caches (EEVEE)` (evidence: https://docs.blender.org/manual/en/5.2/render/eevee/light_probes/volume.html, checked 2026-12-01)
- godot: builtin — `Add LightmapProbe nodes under a baked LightmapGI for dynamic objects` (evidence: https://github.com/godotengine/godot/blob/4.7.2-stable/doc/classes/LightmapProbe.xml, checked 2026-12-01)
- threejs: official — `import { LightProbeGrid } from 'three/addons/lighting/LightProbeGrid.js'` (evidence: https://github.com/mrdoob/three.js/blob/r187/examples/jsm/lighting/LightProbeGrid.js, checked 2026-12-01)
- unity: builtin — `GameObject > Light > Adaptive Probe Volume (or Light Probe Group)` (evidence: https://github.com/Unity-Technologies/Graphics/blob/557f6ac22b948284f57ffae6a789751fd1f63620/Packages/com.unity.render-pipelines.high-definition/Documentation~/probevolumes.md, checked 2026-12-01) — Adaptive Probe Volumes (baked) and Light Probe Groups, URP and HDRP.
- unreal: builtin — `Volumetric Lightmaps built by Lightmass (World Settings > Lightmass > Volume Lighting Sample Placement Scale)` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/volumetric-lightmaps-in-unreal-engine, checked 2026-12-01) — Precomputed SH volumetric lightmap.

## Dataflow

- Inputs: irradiance-probes, mesh
- Outputs: irradiance-probes
- Platforms: webgl2, webgpu, desktop-gpu, mobile-gpu, unity, unreal, godot

## Presets

### Irradiance Volumes & Light Probes — 3D trilinear SH probe lattice & directional probe spheres (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_PROBE_SIZE": 0.11,
  "P_GI_STRENGTH": 1.25,
  "P_SUN_SWEEP": 1,
  "P_SH_CONTRAST": 1
}
```

```glsl
const float P_PROBE_SIZE = 0.11; // P Probe Sphere Size [0.0, 0.18, 0.005]
const float P_GI_STRENGTH = 1.25; // P Volume GI Gain [0.2, 2.4, 0.05]
const float P_SUN_SWEEP = 1.0; // P Sun Motion [0.0, 2.5, 0.05]
const float P_SH_CONTRAST = 1.0; // P SH Directionality [0.2, 1.8, 0.05]

float sdBox(vec3 p, vec3 b) {
  vec3 q = abs(p) - b;
  return length(max(q, 0.0)) + min(max(q.x, max(q.y, q.z)), 0.0);
}

// Architectural gallery + 3x2x2 lattice of floating SH light-probe spheres
vec2 mapScene(vec3 p, float probeR) {
  vec2 res = vec2(1.0 + p.y, 1.0); // floor
  float cD = 1.0 - p.y; if (cD < res.x) res = vec2(cD, 1.0);
  float bD = 1.50 + p.z; if (bD < res.x) res = vec2(bD, 1.0);
  float lD = 1.50 + p.x; if (lD < res.x) res = vec2(lD, 2.0); // warm amber-crimson wall
  float rD = 1.50 - p.x; if (rD < res.x) res = vec2(rD, 3.0); // cool azure wall

  // Central matte sculpture pedestal
  float dPed = sdBox(p - vec3(0.0, -0.62, -0.35), vec3(0.42, 0.38, 0.34)) - 0.025;
  if (dPed < res.x) res = vec2(dPed, 4.0);
  float dStat = length(p - vec3(0.0, -0.02, -0.35)) - 0.26;
  if (dStat < res.x) res = vec2(dStat, 4.0);

  // Visible 3D irradiance probe lattice (3 in X, 2 in Y, 2 in Z)
  if (probeR > 0.005) {
    vec3 q = p - vec3(0.0, 0.05, -0.25);
    vec3 id = clamp(floor(q / vec3(0.88, 0.78, 0.85) + 0.5), vec3(-1.0, 0.0, -1.0), vec3(1.0, 1.0, 0.0));
    vec3 cellC = id * vec3(0.88, 0.78, 0.85) + vec3(0.0, 0.05, -0.25);
    float dProbe = length(p - cellC) - probeR;
    if (dProbe < res.x) res = vec2(dProbe, 5.0);
  }
  return res;
}

vec3 calcNormal(vec3 p, float probeR) {
  vec2 e = vec2(0.0025, 0.0);
  return normalize(vec3(
    mapScene(p + e.xyy, probeR).x - mapScene(p - e.xyy, probeR).x,
    mapScene(p + e.yxy, probeR).x - mapScene(p - e.yxy, probeR).x,
    mapScene(p + e.yyx, probeR).x - mapScene(p - e.yyx, probeR).x
  ));
}

// Evaluate L0 + L1 Spherical Harmonics irradiance at a single 3D probe location probePos in direction dir
vec3 evalSHProbe(vec3 probePos, vec3 dir, vec3 sunPos, float shContrast) {
  // L0 isotropic ambient base
  vec3 l0 = vec3(0.14, 0.16, 0.21);

  // Directional SH lobes from warm crimson left wall, azure right wall, skylight ceiling, and moving sun bounce
  float wLeft = exp(-max(probePos.x + 1.5, 0.0) * 0.75);
  float wRight = exp(-max(1.5 - probePos.x, 0.0) * 0.75);
  float wCeil = exp(-max(1.0 - probePos.y, 0.0) * 0.85);
  vec3 toSun = sunPos - probePos;
  float rSun = length(toSun) + 0.45;
  vec3 dirSun = toSun / max(length(toSun), 1e-4);

  // Cosine-convolved SH basis: 0.5 + 0.5 * dot(dir, sourceDir)
  float cL = mix(0.5, max(dot(dir, vec3(-1.0, 0.0, 0.0)), 0.0), clamp(shContrast, 0.1, 1.5));
  float cR = mix(0.5, max(dot(dir, vec3(1.0, 0.0, 0.0)), 0.0), clamp(shContrast, 0.1, 1.5));
  float cU = mix(0.5, max(dot(dir, vec3(0.0, 1.0, 0.0)), 0.0), clamp(shContrast, 0.1, 1.5));
  float cS = mix(0.5, max(dot(dir, dirSun), 0.0), clamp(shContrast, 0.1, 1.5));

  vec3 irr = l0;
  irr += vec3(1.18, 0.26, 0.14) * wLeft * cL * 1.15;
  irr += vec3(0.14, 0.56, 1.18) * wRight * cR * 1.15;
  irr += vec3(0.65, 0.78, 0.96) * wCeil * cU * 0.55;
  irr += vec3(1.45, 1.12, 0.56) * cS / (rSun * rSun * 0.75 + 0.35);
  return irr;
}

// Trilinear interpolation across the 3D irradiance probe volume grid
vec3 sampleIrradianceVolume(vec3 p, vec3 n, vec3 sunPos, float shContrast) {
  vec3 stepSz = vec3(0.88, 0.78, 0.85);
  vec3 q = (p - vec3(0.0, 0.05, -0.25)) / stepSz;
  vec3 b = floor(q);
  vec3 f = fract(q);
  vec3 o = vec3(0.0, 0.05, -0.25);

  vec3 p000 = evalSHProbe((b + vec3(0.0, 0.0, 0.0)) * stepSz + o, n, sunPos, shContrast);
  vec3 p100 = evalSHProbe((b + vec3(1.0, 0.0, 0.0)) * stepSz + o, n, sunPos, shContrast);
  vec3 p010 = evalSHProbe((b + vec3(0.0, 1.0, 0.0)) * stepSz + o, n, sunPos, shContrast);
  vec3 p110 = evalSHProbe((b + vec3(1.0, 1.0, 0.0)) * stepSz + o, n, sunPos, shContrast);
  vec3 p001 = evalSHProbe((b + vec3(0.0, 0.0, 1.0)) * stepSz + o, n, sunPos, shContrast);
  vec3 p101 = evalSHProbe((b + vec3(1.0, 0.0, 1.0)) * stepSz + o, n, sunPos, shContrast);
  vec3 p011 = evalSHProbe((b + vec3(0.0, 1.0, 1.0)) * stepSz + o, n, sunPos, shContrast);
  vec3 p111 = evalSHProbe((b + vec3(1.0, 1.0, 1.0)) * stepSz + o, n, sunPos, shContrast);

  vec3 x00 = mix(p000, p100, f.x);
  vec3 x10 = mix(p010, p110, f.x);
  vec3 x01 = mix(p001, p101, f.x);
  vec3 x11 = mix(p011, p111, f.x);
  return mix(mix(x00, x10, f.y), mix(x01, x11, f.y), f.z);
}

vec3 aces(vec3 x) {
  x = max(x, 0.0);
  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
  float tAnim = iTime * max(P_SUN_SWEEP, 0.0);
  float probeR = clamp(P_PROBE_SIZE, 0.0, 0.20);
  float giGain = max(P_GI_STRENGTH, 0.0);
  float shCon = clamp(P_SH_CONTRAST, 0.15, 1.8);

  vec3 ro = vec3(0.28 * sin(tAnim * 0.35), 0.16, 2.35);
  vec3 ta = vec3(0.0, -0.05, -0.45);
  vec3 fw = normalize(ta - ro);
  vec3 rt = normalize(cross(fw, vec3(0.0, 1.0, 0.0)));
  vec3 up = cross(rt, fw);
  vec3 rd = normalize(fw * 1.48 + rt * uv.x + up * uv.y);

  vec3 sunPos = vec3(0.95 * cos(tAnim * 0.65), 0.72, -0.35 + 0.55 * sin(tAnim * 0.65));

  vec3 col = vec3(0.02);
  float t = 0.0;
  float matId = 0.0;
  bool hit = false;
  for (int i = 0; i < 68; i++) {
    vec2 h = mapScene(ro + rd * t, probeR);
    if (h.x < 0.002) { hit = true; matId = h.y; break; }
    t += h.x;
    if (t > 10.0) break;
  }

  if (hit) {
    vec3 p = ro + rd * t;
    vec3 n = calcNormal(p, probeR);

    if (matId > 4.5) {
      // Light Probe visualization sphere: directly displays its stored directional SH irradiance E(n)!
      vec3 shVis = evalSHProbe(p, n, sunPos, shCon) * giGain;
      float rim = pow(1.0 - max(dot(n, -rd), 0.0), 3.0);
      col = shVis + vec3(0.85, 0.92, 1.0) * rim * 0.35;
    } else {
      vec3 alb = vec3(0.76, 0.76, 0.74);
      if (matId > 1.5 && matId < 2.5) alb = vec3(0.88, 0.22, 0.14);
      else if (matId > 2.5 && matId < 3.5) alb = vec3(0.14, 0.46, 0.88);
      else if (matId > 3.5) alb = vec3(0.86, 0.85, 0.83);

      // Direct light from moving overhead warm lamp
      vec3 toL = sunPos - p;
      float dL = length(toL);
      vec3 lDir = toL / max(dL, 1e-4);
      float diff = max(dot(n, lDir), 0.0);
      vec3 direct = alb * vec3(1.9, 1.65, 1.25) * diff / (1.0 + 0.55 * dL * dL);

      // Trilinearly interpolated 3D Irradiance Volume GI
      vec3 irr = sampleIrradianceVolume(p, n, sunPos, shCon);
      col = direct + alb * irr * giGain * 0.72;
    }
  }

  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}
```

Attribution: Original interactive WebGL2 fragment shader written for Texel Atlas (MIT).

## Combines with

- [Lightmap Baking](https://texelatlas.vercel.app/t/lightmap-baking.md): Lightmaps cover static surfaces; the same bake feeds probes for moving objects.

## Sources

1. [primary] G. Greger, P. Shirley, P.M. Hubbard, D.P. Greenberg (1998) The irradiance volume. IEEE Computer Graphics and Applications. https://doi.org/10.1109/38.656788 (verified via crossref on 2026-11-29)

## Cite this entry

Texel. "Irradiance Volumes and Light Probes." https://texelatlas.vercel.app/t/irradiance-volumes/ (accessed 2026-12-01).
