Lightcuts
Clusters many point lights into a hierarchy and, per shading point, picks a cut through it that bounds the error, so the cost grows sublinearly with light count and error stays below a perceptual threshold.
Also known as multidimensional lightcuts
In the family Light transport & global illumination, many-light sampling
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
Given thousands to millions of point lights (real lights, virtual lights from Instant Radiosity (Virtual Point Lights), environment map samples), lightcuts builds a light tree where each node represents a cluster by a single representative light and an intensity sum.
For a shading point, the renderer starts with a cut consisting of the root. It evaluates the cluster's contribution using the representative, and a cheap upper bound on the error of that approximation (bounds on the geometric, material and visibility terms, with visibility conservatively taken as 1). If the bound exceeds a threshold of about 2 percent of the current total, the cluster with the largest bound is replaced by its children. This repeats until every cluster is below the threshold. The error bound is perceptually motivated (Weber's law), so brighter points allow larger absolute errors.
Multidimensional lightcuts extends the tree to cover other integrals (pixel area, motion blur, depth of field, participating media) by clustering the product of lights and gather points, so the same cut mechanism handles all these effects.
When to choose it
Reach for it when
- render time grows linearly with number of lights
- need error-bounded approximation of many point lights
- environment lighting with thousands of directional lights
- virtual point lights are too expensive to evaluate all
- want deterministic many-light cost with perceptual error limit
Choose it when you have many fixed point lights or need deterministic error-bounded convergence for a many-light approximation, such as VPL-based GI or HDR environment illumination with thousands of directional lights.
Prefer Light BVH and Adaptive Tree Splitting when you want a stochastic, unbiased sampler inside a path tracer. Prefer ReSTIR DI: Spatiotemporal Reservoir Resampling for Direct Lighting for real-time dynamic lights. Prefer Unidirectional Path Tracing when the number of emitters is small.
Field marks
- Conservative visibility bound (assume visible) causes oversized cuts in heavily shadowed regions
- Bias from representative-light substitution: clustering can create visible banding when the error threshold is loose
- Singularities at near-field VPLs still require clamping that darkens corners
- Light tree must be rebuilt when emitters move, so animated lights lose the amortization
Presets
Lightcuts — adaptive per-pixel tree cut-size heatmap (left) vs perceptually bounded hierarchical shading (right)
{
"P_ERR_THRESH": 0.06,
"P_LIGHT_SPREAD": 1,
"P_CAM_MOVE": 0.35,
"P_SPLIT": 0.48
}Show GLSL (157 lines)
const float P_ERR_THRESH = 0.06; // P Error Threshold [0.01, 0.25, 0.01]
const float P_LIGHT_SPREAD = 1.00; // P Cluster Spread [0.5, 1.6, 0.05]
const float P_CAM_MOVE = 0.35; // P Orbit Speed [0.0, 1.2, 0.05]
const float P_SPLIT = 0.48; // P Cut Heatmap / Lit [0.0, 1.0, 0.02]
void getClusterLight(int cl, int sub, float spread, out vec3 pos, out vec3 col) {
vec3 center;
if (cl == 0) { center = vec3(-1.05, 0.35, -0.25); col = vec3(2.2, 1.35, 0.55); }
else if (cl == 1) { center = vec3(0.0, 0.55, -0.92); col = vec3(0.45, 1.65, 2.45); }
else if (cl == 2) { center = vec3(1.05, 0.32, -0.30); col = vec3(2.35, 0.55, 1.15); }
else { center = vec3(0.0, 0.18, 0.42); col = vec3(0.65, 2.20, 0.95); }
float ang = float(sub) * 1.0471975 + float(cl) * 0.7;
float r = 0.24 * spread;
pos = center + vec3(cos(ang) * r, 0.12 * sin(ang * 2.0), sin(ang) * r);
}
vec2 mapRoom(vec3 p) {
float dFloor = p.y + 0.58;
float dBack = p.z + 1.85;
vec2 res = vec2(dFloor, 1.0);
if (dBack < res.x) res = vec2(dBack, 2.0);
float dArch1 = length(p - vec3(-0.62, -0.26, -0.45)) - 0.32;
if (dArch1 < res.x) res = vec2(dArch1, 3.0);
float dArch2 = length(p - vec3(0.58, -0.26, -0.58)) - 0.32;
if (dArch2 < res.x) res = vec2(dArch2, 3.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
));
}
vec3 infernoMap(float t) {
t = clamp(t, 0.0, 1.0);
vec3 c0 = vec3(0.07, 0.05, 0.22);
vec3 c1 = vec3(0.58, 0.14, 0.46);
vec3 c2 = vec3(0.96, 0.48, 0.12);
vec3 c3 = vec3(0.99, 0.96, 0.58);
if (t < 0.33) return mix(c0, c1, t * 3.0);
if (t < 0.66) return mix(c1, c2, (t - 0.33) * 3.0);
return mix(c2, c3, (t - 0.66) * 3.0);
}
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 sx = fragCoord.x / max(iResolution.x, 1.0);
float split = clamp(P_SPLIT, 0.0, 1.0);
bool showShaded = sx >= split;
float errThr = clamp(P_ERR_THRESH, 0.008, 0.30);
float spread = clamp(P_LIGHT_SPREAD, 0.4, 1.8);
float camA = sin(iTime * max(P_CAM_MOVE, 0.0)) * 0.32;
vec3 ro = vec3(camA, 0.44, 2.08);
vec3 ta = vec3(0.0, -0.22, -0.52);
vec3 fw = normalize(ta - ro);
vec3 ri = normalize(cross(fw, vec3(0.0, 1.0, 0.0)));
vec3 up = cross(ri, fw);
vec3 rd = normalize(fw * 1.38 + ri * uv.x + up * uv.y);
vec3 col = vec3(0.03, 0.035, 0.05);
float t = 0.05;
float hitId = 0.0;
for (int i = 0; i < 64; i++) {
vec2 h = mapRoom(ro + rd * t);
if (h.x < 0.002) { hitId = h.y; break; }
t += h.x;
if (t > 9.0) break;
}
if (hitId > 0.5) {
vec3 p = ro + rd * t;
vec3 n = calcNormal(p);
vec3 alb = (hitId < 1.5) ? vec3(0.62, 0.62, 0.65) : ((hitId < 2.5) ? vec3(0.50, 0.52, 0.56) : vec3(0.84, 0.82, 0.78));
// Lightcuts per-pixel adaptive cut across 4 clusters x 6 leaf lights = 24 lights
vec3 clCent[4];
vec3 clCol[4];
clCent[0] = vec3(-1.05, 0.35, -0.25); clCol[0] = vec3(2.2, 1.35, 0.55);
clCent[1] = vec3(0.0, 0.55, -0.92); clCol[1] = vec3(0.45, 1.65, 2.45);
clCent[2] = vec3(1.05, 0.32, -0.30); clCol[2] = vec3(2.35, 0.55, 1.15);
clCent[3] = vec3(0.0, 0.18, 0.42); clCol[3] = vec3(0.65, 2.20, 0.95);
vec3 irr = vec3(0.0);
float cutNodes = 0.0;
float clRad = 0.28 * spread;
for (int cl = 0; cl < 4; cl++) {
float dCl = length(clCent[cl] - p);
// Lightcuts upper error bound for collapsing cluster into 1 representative node: proportional to radius / dist^2
float minDist = max(dCl - clRad, 0.12);
float errBound = (clRad * 1.45) / max(minDist * minDist, 0.04);
if (errBound <= errThr * 8.5) {
// Accept collapsed cluster node (1 representative evaluation for all 6 lights!)
cutNodes += 1.0;
vec3 toL = clCent[cl] - p;
float d2 = max(dot(toL, toL), 0.12);
float ndl = max(dot(n, toL / sqrt(d2)), 0.0);
irr += clCol[cl] * (6.0 * ndl / d2) * 0.045;
} else {
// Refine cluster into individual leaf lights (6 evaluations)
cutNodes += 6.0;
for (int sub = 0; sub < 6; sub++) {
vec3 lPos, lCol;
getClusterLight(cl, sub, spread, lPos, lCol);
vec3 toL = lPos - p;
float d2 = max(dot(toL, toL), 0.08);
float ndl = max(dot(n, toL / sqrt(d2)), 0.0);
irr += lCol * (ndl / d2) * 0.045;
}
}
}
if (showShaded) {
col = alb * (irr + vec3(0.035, 0.042, 0.058));
} else {
// Left: Adaptive cut-size heatmap (dark indigo = 4 collapsed nodes, bright gold = 18-24 refined leaf nodes)
float normCut = (cutNodes - 4.0) / 20.0;
vec3 heat = infernoMap(normCut);
float shadingHint = 0.45 + 0.55 * clamp(dot(irr, vec3(0.3, 0.6, 0.1)), 0.0, 1.0);
// Subtle iso-boundary contour between collapsed and refined regions
float iso = smoothstep(0.08, 0.02, abs(fract(cutNodes / 5.0) - 0.5));
col = heat * shadingHint + vec3(0.95, 0.98, 1.0) * iso * 0.18;
}
}
// Draw glowing cluster leaves so user sees the light hierarchy directly
for (int cl = 0; cl < 4; cl++) {
for (int sub = 0; sub < 6; sub++) {
vec3 lPos, lCol;
getClusterLight(cl, sub, spread, lPos, lCol);
vec3 toL = lPos - ro;
float proj = dot(toL, rd);
if (proj > 0.1 && proj < t) {
float perp = length(toL - rd * proj);
col += lCol * exp(-perp * perp * 1100.0) * 0.58;
}
}
}
float sep = smoothstep(0.0035, 0.0008, abs(sx - 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: MIT — written for this index.
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| lightcuts-live | Tesla T4 1920x1080 | 20.9× baseline (heavy) · 0.687 ms / 0.752 ms | opengl-timer-query · 32 frames · GPU Weight Atlas · Colab T4 sweep |
| lightcuts-live | NVIDIA L4 1920x1080 | 20.1× baseline (heavy) · 0.319 ms / 0.320 ms · 2.1× faster on L4 | opengl-timer-query · Cross-architecture validation |
| lightcuts-live | NVIDIA A100-SXM4-40GB 1920x1080 | 14.1× baseline (moderate) · 0.405 ms / 0.408 ms · 1.7× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites Instant Radiosity (Virtual Point Lights), Preetham Analytic Daylight Model, Metropolis Light Transport; cited by Delta (Woodcock) Tracking, Light BVH and Adaptive Tree Splitting, Light Propagation Volumes, ReSTIR DI: Spatiotemporal Reservoir Resampling for Direct Lighting, ReSTIR PT and Generalized Resampled Importance Sampling, Ray-marched Participating Media, Voxel Cone Tracing.
Crosses
- Instant Radiosity (Virtual Point Lights): Lightcuts gathers the thousands of virtual point lights that instant radiosity generates.
Sources
- primaryBruce Walter, Sebastian Fernandez, Adam Arbree, Kavita Bala, Michael Donikian, Donald P. Greenberg (2005). Lightcuts. ACM Transactions on Graphics.Verified via crossref · 2026-11-29doi:10.1145/1073204.1073318
- primaryBruce Walter, Adam Arbree, Kavita Bala, Donald P. Greenberg (2006). Multidimensional lightcuts. ACM Transactions on Graphics.Verified via crossref · 2026-11-29doi:10.1145/1141911.1141997