Reflection probes with parallax-corrected cubemaps
Local specular probes: a cubemap is captured at a point in a room and its lookup is corrected with a proxy box, so reflections shift with the viewer and sit where the real walls are instead of at infinity.
Also known as box projected cubemaps, local cubemap reflections, box projection, reflection probes
In the family Light transport & global illumination, specular probes
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | CubeCamera captures cubemaps; no built-in box-projected parallax correction. |
| Babylon.js 9.38.0 | Built in | new ReflectionProbe(name, size, scene); cubeTexture.boundingBoxSize docs |
| Godot 4.7 | Built in | ReflectionProbe.box_projection = true docs |
| Unity | Built in | Reflection Probe > Box Projection (ReflectionProbe.boxProjection) docs |
| Unreal 5.7 | Built in | Place a Box Reflection Capture actor docs |
| Blender 5.2 | Built in | Add > Light Probe > Sphere; Object Data > Custom Parallax docs EEVEE only. |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
A reflection probe is a cubemap rendered or baked at a capture position, with a proxy volume (usually an axis-aligned or oriented box) that approximates the room around it. A plain cubemap lookup uses only the reflection direction, which behaves as if every wall were infinitely far away, so reflections slide with the camera and float on floors.
The correction intersects the reflected ray, starting at the shaded point, with the proxy box and takes the exit point. The lookup direction becomes exitPoint - probePosition, so the cubemap is sampled where that ray would land seen from the capture position. Reflections then stay anchored to the walls, and the floor reflection of a window lands under the window.
Probes carry an influence volume. Pixels blend between overlapping probes by distance or priority, the cubemap is prefiltered by roughness into its mip chain as in Split-Sum Image-Based Lighting, and the result is multiplied by specular occlusion because the cubemap knows nothing about local blockers. Probes can be baked once or re-captured at a low rate for dynamic scenes.
When to choose it
Reach for it when
- reflections on a floor slide when the camera moves
- cubemap reflections look pasted on instead of in the room
- need cheap local specular reflections for interiors
- reflections of walls float at infinity on glossy floors
Choose it as the baseline local specular lighting in interiors and mixed scenes: it costs one box intersection and one cubemap fetch per pixel and works on WebGL2 and mobile.
Prefer Environment mapping, cubemaps and skyboxes for sky and distant HDRI backdrops where parallax does not matter. Prefer Screen-space reflections for sharp reflections of on-screen dynamic objects, and fall back to this probe where SSR has no data. Prefer Hybrid ray-traced reflections when hardware ray tracing is available and probes are too coarse. Prefer Planar reflections with oblique near-plane clipping for a single flat mirror or water plane that needs exact reflections.
Field marks
- Proxy box mismatch: where real walls are not on the box, reflected edges bend or doubled corners appear
- Objects between the surface and the proxy wall are baked at the probe position, so they reflect with the wrong parallax or appear smeared
- Visible pops when blending between overlapping probes if influence volumes do not fade smoothly
- Reflection of the probe's own capture position: surfaces near the capture point appear in their own reflections
- Light leaks when a probe sees the outdoors through a window and its volume spills into the neighbouring room
- Dynamic objects and lights are missing unless the probe is re-captured, which then costs a cubemap render and prefilter
Presets
Box-projected vs plain cubemap floor reflection
{
"box_min": [
-4,
-1,
-4
],
"box_max": [
4,
3,
4
],
"probe": [
0,
1,
0
]
}Show GLSL (39 lines)
// Parallax-corrected (box-projected) reflection probe: left half uncorrected, right half corrected.
const vec3 BMIN = vec3(-4.0, -1.0, -4.0); // probe proxy volume (room)
const vec3 BMAX = vec3( 4.0, 3.0, 4.0);
const vec3 PROBE = vec3(0.0, 1.0, 0.0); // capture position of the cubemap
// Stand-in for a baked cubemap: depends on direction only.
vec3 cubemap(vec3 d) {
vec3 a = abs(d); vec2 uv; vec3 col;
if (a.x >= a.y && a.x >= a.z) { uv = d.yz / a.x; col = d.x > 0.0 ? vec3(0.9, 0.3, 0.25) : vec3(0.25, 0.5, 0.9); }
else if (a.y >= a.z) { uv = d.xz / a.y; col = d.y > 0.0 ? vec3(0.9, 0.9, 0.85) : vec3(0.35); }
else { uv = d.xy / a.z; col = d.z > 0.0 ? vec3(0.3, 0.8, 0.4) : vec3(0.9, 0.8, 0.3); }
vec2 g = floor(uv * 3.0 + 3.0);
float c = mod(g.x + g.y, 2.0);
return col * (0.45 + 0.55 * c);
}
// Ray from p inside the box: exit point.
vec3 boxExit(vec3 p, vec3 d) {
vec3 t = max((BMAX - p) / d, (BMIN - p) / d);
return p + d * min(t.x, min(t.y, t.z));
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
vec3 ro = vec3(sin(iTime * 0.5) * 1.0, 0.2, -3.2);
vec3 rd = normalize(vec3(uv.x, uv.y - 0.3, 1.0));
vec3 col;
if (rd.y < -0.001) {
float t = (BMIN.y - ro.y) / rd.y;
vec3 p = ro + rd * t;
vec3 r = reflect(rd, vec3(0.0, 1.0, 0.0));
vec3 lookup = (uv.x < 0.0) ? r : boxExit(p, r) - PROBE;
float fres = 0.04 + 0.96 * pow(1.0 - clamp(-rd.y, 0.0, 1.0), 5.0);
col = vec3(0.04, 0.05, 0.06) + cubemap(lookup) * (0.35 + 0.65 * fres);
} else {
col = cubemap(boxExit(ro, rd) - PROBE);
}
col *= 1.0 - 0.9 * smoothstep(0.004, 0.0, abs(uv.x));
fragColor = vec4(pow(col, vec3(1.0 / 2.2)), 1.0);
}
Attribution: written for this index
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| parallax-corrected-reflection-split | Tesla T4 1920x1080 | 1.84× baseline (feather) · 0.061 ms / 0.064 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| parallax-corrected-reflection-split | NVIDIA L4 1920x1080 | 1.47× baseline (feather) · 0.023 ms / 0.024 ms · 2.6× faster on L4 | opengl-timer-query · Cross-architecture validation |
| parallax-corrected-reflection-split | NVIDIA A100-SXM4-40GB 1920x1080 | 1.08× baseline (feather) · 0.031 ms / 0.031 ms · 1.9× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
Crosses
- Split-Sum Image-Based Lighting: The probe cubemap is prefiltered by roughness into the mip chain that the split-sum lookup samples; the box projection only changes the lookup direction.
- Ground-Truth Specular Occlusion: Supplies the per-pixel occlusion factor that hides probe reflections inside crevices the cubemap cannot know about.
- Screen-space reflections: SSR overrides the probe where the screen has a hit and the probe fills in misses and off-screen content.
Sources
- primarySébastien Lagarde. Image-based Lighting approaches and parallax-corrected cubemap. seblagarde.wordpress.com.Verified via live page · 2026-11-29
- talkSébastien Lagarde, Charles de Rousiers. Moving Frostbite to Physically Based Rendering. SIGGRAPH 2014 course.Verified via live page · 2026-11-29
- implementationmrdoob (2010). mrdoob/three.js. JavaScript 3D Library.GitHub API · license MIT · 2026-11-29