Light Propagation Volumes
Injects virtual point lights from reflective shadow maps into a coarse 3D grid of spherical-harmonic radiance, then diffuses the light cell-to-cell for several iterations to approximate multi-bounce indirect lighting.
Also known as LPV, cascaded LPV
In the family Light transport & global illumination, grid-based GI
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | |
| Unity | None found | |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
A 3D grid (often cascaded around the camera) stores, per cell, the radiance as a low-order spherical-harmonic vector. Each frame has three stages.
Injection: the texels of one or more reflective shadow maps become virtual point lights and splat their flux into the cell that contains them as an SH cosine lobe. Geometry from depth buffers is also injected as occluder SH to later block light.
Propagation: light flows between neighbouring cells. Each cell sends a fraction of its SH radiance through each of its six faces, using precomputed face-flux coefficients and then re-projecting into the neighbouring cell's SH. Repeating this step (typically 8 to 16 iterations) pushes light farther through empty space. A geometry-volume occupancy term damps flux through solid cells.
Lookup: shading points sample the grid trilinearly and evaluate the SH for the surface normal. This is entirely image/grid space and so scene complexity does not matter.
When to choose it
Reach for it when
- cheap dynamic indirect lighting for older hardware
- one-bounce gi with no baking or ray tracing
- diffuse color bleeding in moving scenes
- gi that fits in a small frame time budget
Choose it as a very inexpensive dynamic GI for a single dominant light on mid-range hardware, a historical choice for 2010-era engines.
Prefer Voxel Cone Tracing when higher quality glossy transport and sharper occlusion are required. Prefer Dynamic Diffuse Global Illumination (DDGI) or Radiance Cascades when ray tracing or SDF tracing is available. Prefer Reflective Shadow Maps alone if only a one-bounce direct gather is enough.
Field marks
- Light bleeding through walls thinner than a cell, since occlusion is only approximated
- Low spatial resolution (cell size of tens of centimetres) so indirect shadows are very soft
- Directional smearing and ringing from low-order SH in the propagation step
- Cascade boundaries produce visible lighting discontinuities and flicker as the grid follows the camera
Presets
Light Propagation Volumes — 3D SH flux lattice injection, multi-step propagation & colored bounce bleed
{
"P_GRID_RES": 5,
"P_PROP_SPREAD": 1,
"P_BOUNCE_GAIN": 1.35,
"P_SPLIT": 0.36
}Show GLSL (163 lines)
const float P_GRID_RES = 5.0; // P LPV Lattice Res [3.0, 9.0, 1.0]
const float P_PROP_SPREAD = 1.0; // P Prop Diffusion [0.35, 2.0, 0.05]
const float P_BOUNCE_GAIN = 1.35; // P LPV GI Gain [0.0, 2.5, 0.05]
const float P_SPLIT = 0.36; // P Direct / LPV Split [0.0, 1.0, 0.02]
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);
}
// Cornell chamber with matte pedestal & central arch baffle
vec2 mapRoom(vec3 p) {
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.45 + p.z; if (bD < res.x) res = vec2(bD, 1.0);
float lD = 1.45 + p.x; if (lD < res.x) res = vec2(lD, 2.0); // crimson wall
float rD = 1.45 - p.x; if (rD < res.x) res = vec2(rD, 3.0); // cobalt-teal wall
float dP1 = sdBox(p - vec3(-0.32, -0.52, -0.35), vec3(0.28, 0.48, 0.28)) - 0.02;
if (dP1 < res.x) res = vec2(dP1, 4.0);
float dSph = length(p - vec3(0.42, -0.58, -0.15)) - 0.38;
if (dSph < res.x) res = vec2(dSph, 4.0);
return res;
}
vec3 calcNormal(vec3 p) {
vec2 e = vec2(0.0025, 0.0);
return normalize(vec3(
mapRoom(p + e.xyy).x - mapRoom(p - e.xyy).x,
mapRoom(p + e.yxy).x - mapRoom(p - e.yxy).x,
mapRoom(p + e.yyx).x - mapRoom(p - e.yyx).x
));
}
// Evaluate 2-band SH LPV cell irradiance at quantized voxel center vc for surface normal n
vec3 evalLpvCell(vec3 vc, vec3 n, vec3 sunPatch, float spread) {
// 3 injected directional flux sources propagated through the 3D SH lattice:
// 1) Sunlit floor/wall bounce patch (sweeps across the red & teal walls)
vec3 dSun = sunPatch - vc;
float rSun = length(dSun) + 0.35;
vec3 dirSun = dSun / max(length(dSun), 1e-4);
vec3 patchCol = mix(vec3(1.1, 0.92, 0.65), vec3(1.45, 0.24, 0.16), smoothstep(-0.3, -1.2, sunPatch.x));
patchCol = mix(patchCol, vec3(0.16, 1.15, 0.92), smoothstep(0.3, 1.2, sunPatch.x));
// SH L0 (isotropic) + L1 (directional cosine lobe) propagation kernel
float kSun = exp(-rSun * (0.95 / max(spread, 0.2))) / (0.45 + rSun * rSun * 0.6);
float shSun = 0.45 + 0.55 * max(dot(n, dirSun), 0.0);
// 2) Persistent crimson left wall flux
vec3 dLeft = vec3(-1.42, vc.y * 0.5, -0.35) - vc;
float rL = length(dLeft) + 0.4;
float shL = 0.42 + 0.58 * max(dot(n, normalize(dLeft)), 0.0);
vec3 fluxL = vec3(1.05, 0.16, 0.12) * exp(-rL * (0.85 / max(spread, 0.2))) * shL * 0.52;
// 3) Persistent teal right wall flux
vec3 dRight = vec3(1.42, vc.y * 0.5, -0.35) - vc;
float rR = length(dRight) + 0.4;
float shR = 0.42 + 0.58 * max(dot(n, normalize(dRight)), 0.0);
vec3 fluxR = vec3(0.12, 0.88, 0.72) * exp(-rR * (0.85 / max(spread, 0.2))) * shR * 0.52;
return patchCol * kSun * shSun * 1.45 + fluxL + fluxR;
}
// Trilinearly interpolated 3D LPV lookup matching hardware 3D texture sampling
vec3 sampleLPV(vec3 p, vec3 n, vec3 sunPatch, float gridRes, float spread) {
vec3 gp = p * gridRes;
vec3 base = floor(gp);
vec3 f = fract(gp);
vec3 c000 = evalLpvCell((base + vec3(0.5, 0.5, 0.5)) / gridRes, n, sunPatch, spread);
vec3 c100 = evalLpvCell((base + vec3(1.5, 0.5, 0.5)) / gridRes, n, sunPatch, spread);
vec3 c010 = evalLpvCell((base + vec3(0.5, 1.5, 0.5)) / gridRes, n, sunPatch, spread);
vec3 c110 = evalLpvCell((base + vec3(1.5, 1.5, 0.5)) / gridRes, n, sunPatch, spread);
vec3 c001 = evalLpvCell((base + vec3(0.5, 0.5, 1.5)) / gridRes, n, sunPatch, spread);
vec3 c101 = evalLpvCell((base + vec3(1.5, 0.5, 1.5)) / gridRes, n, sunPatch, spread);
vec3 c011 = evalLpvCell((base + vec3(0.5, 1.5, 1.5)) / gridRes, n, sunPatch, spread);
vec3 c111 = evalLpvCell((base + vec3(1.5, 1.5, 1.5)) / gridRes, n, sunPatch, spread);
vec3 c00 = mix(c000, c100, f.x);
vec3 c10 = mix(c010, c110, f.x);
vec3 c01 = mix(c001, c101, f.x);
vec3 c11 = mix(c011, c111, f.x);
return mix(mix(c00, c10, f.y), mix(c01, c11, 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 screenX = fragCoord.x / max(iResolution.x, 1.0);
float split = clamp(P_SPLIT, 0.0, 1.0);
float gridRes = clamp(floor(P_GRID_RES + 0.5), 2.0, 10.0);
float spread = clamp(P_PROP_SPREAD, 0.3, 2.2);
float giGain = max(P_BOUNCE_GAIN, 0.0);
vec3 ro = vec3(0.0, 0.04, 2.35);
vec3 rd = normalize(vec3(uv, -1.48));
// Sweeping direct sun spot injecting VPL flux into the LPV lattice
vec3 sunPatch = vec3(1.15 * sin(iTime * 0.55), -0.95 + 0.45 * abs(sin(iTime * 0.55)), -0.35 + 0.45 * cos(iTime * 0.42));
vec3 lightPos = vec3(0.0, 0.92, 0.25);
vec3 col = vec3(0.02);
float t = 0.0;
float matId = 0.0;
bool hit = false;
for (int i = 0; i < 64; i++) {
vec2 h = mapRoom(ro + rd * t);
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);
vec3 alb = vec3(0.76, 0.76, 0.74);
if (matId > 1.5 && matId < 2.5) alb = vec3(0.86, 0.14, 0.12);
else if (matId > 2.5 && matId < 3.5) alb = vec3(0.10, 0.74, 0.62);
else if (matId > 3.5) alb = vec3(0.84, 0.83, 0.80);
// Focused direct spotlight beam illuminating sunPatch
vec3 toL = lightPos - p;
float dL = length(toL);
vec3 lDir = toL / max(dL, 1e-4);
vec3 spotAxis = normalize(sunPatch - lightPos);
float spotCos = dot(-lDir, spotAxis);
float spotMask = smoothstep(0.80, 0.94, spotCos);
// Shadow march toward ceiling spotlight
float sh = 1.0;
float ts = 0.03;
for (int i = 0; i < 24; i++) {
float dh = mapRoom(p + lDir * ts).x;
if (dh < 0.004) { sh = 0.0; break; }
ts += dh;
if (ts > dL - 0.08) break;
}
vec3 direct = alb * vec3(2.8, 2.5, 2.1) * max(dot(n, lDir), 0.0) * spotMask * sh / (1.0 + 0.25 * dL * dL);
// Subtle ambient fill + LPV trilinearly sampled SH indirect bounce
vec3 lpvIrr = sampleLPV(p + n * 0.04, n, sunPatch, gridRes, spread);
vec3 indirect = alb * lpvIrr * giGain;
// Show subtle 3D LPV voxel cell boundaries on surfaces so the lattice scale is immediately legible
vec3 vf = abs(fract(p * gridRes - 0.5) - 0.5);
float vEdge = smoothstep(0.035, 0.008, min(vf.x, min(vf.y, vf.z)));
vec3 leftCol = direct + alb * vec3(0.03, 0.035, 0.045);
vec3 rightCol = direct + indirect + lpvIrr * vEdge * 0.18;
col = (screenX < split) ? leftCol : rightCol;
}
float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
col = mix(col, vec3(0.95, 0.97, 1.0), sep);
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).
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| light-propagation-volumes-live | Tesla T4 1920x1080 | 34.0× baseline (heavy) · 1.07 ms / 1.15 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| light-propagation-volumes-live | NVIDIA L4 1920x1080 | 33.2× baseline (heavy) · 0.525 ms / 0.525 ms · 2.0× faster on L4 | opengl-timer-query · Cross-architecture validation |
| light-propagation-volumes-live | NVIDIA A100-SXM4-40GB 1920x1080 | 22.2× baseline (heavy) · 0.638 ms / 0.639 ms · 1.7× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites Horizon-Based Ambient Occlusion, Reflective Shadow Maps, Irradiance Volumes and Light Probes, Instant Radiosity (Virtual Point Lights), Screen-Space Ambient Occlusion, Screen-Space Global Illumination, Precomputed Radiance Transfer, Lightcuts; cited by Alchemy screen-space ambient obscurance, Multi-Scale 3D Diffusive Volumetric Irradiance, Neural Radiance Caching, Voxel Cone Tracing.
Crosses
- Reflective Shadow Maps: RSM texels are the virtual lights that get injected into the volume.
Sources
- primaryAnton Kaplanyan, Carsten Dachsbacher (2010). Cascaded light propagation volumes for real-time indirect illumination. Proceedings of the 2010 ACM SIGGRAPH symposium on Interactive 3D Graphics and Games.Verified via crossref · 2026-11-29doi:10.1145/1730804.1730821