---
id: "reflection-probes-parallax-corrected-cubemaps"
title: "Reflection probes with parallax-corrected cubemaps"
aliases: [box projected cubemaps, local cubemap reflections, box projection, reflection probes]
domain: "gi"
stage: "lighting"
realtime: "realtime"
platforms: [webgl2, webgpu, desktop-gpu, mobile-gpu, unity, unreal, godot]
year_introduced: 2012
inputs: [hdr-image, gbuffer]
outputs: [radiance]
style: "photoreal"
dynamic: "both"
cost: "cheap"
authority: "Lagarde"
url: "https://texelatlas.vercel.app/t/reflection-probes-parallax-corrected-cubemaps/"
sources_verified_at: "2026-11-29"
---
# Reflection probes with parallax-corrected cubemaps (Lagarde)

> 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.

## 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

## 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-ibl](split-sum-ibl), 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 use it

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](environment-mapping-cubemaps) for sky and distant HDRI backdrops where parallax does not matter. Prefer [screen-space-reflections](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](hybrid-ray-traced-reflections) when hardware ray tracing is available and probes are too coarse. Prefer [planar-reflections-oblique-clipping](planar-reflections-oblique-clipping) for a single flat mirror or water plane that needs exact reflections.

## Cost

cheap — A ray-box intersection and a cubemap sample per pixel; capture and prefilter cost is paid at bake time or amortised over frames.
Measured GPU Weight: 1.84× baseline (feather) — 0.0607 ms median / 0.0635 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 1.47× baseline (feather) — 0.0234 ms median (2.59× faster on L4).
Ampere A100 scaling: 1.08× baseline (feather) — 0.0311 ms median (1.95× faster on A100).

## Failure modes

- 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

## Engine support

- babylonjs: builtin — `new ReflectionProbe(name, size, scene); cubeTexture.boundingBoxSize` (evidence: https://github.com/BabylonJS/Babylon.js/blob/9.38.0/packages/dev/core/src/Materials/Textures/cubeTexture.pure.ts, checked 2026-12-01)
- blender: builtin — `Add > Light Probe > Sphere; Object Data > Custom Parallax` (evidence: https://docs.blender.org/manual/en/5.2/render/eevee/light_probes/sphere.html, checked 2026-12-01) — EEVEE only.
- godot: builtin — `ReflectionProbe.box_projection = true` (evidence: https://github.com/godotengine/godot/blob/4.7.2-stable/doc/classes/ReflectionProbe.xml, checked 2026-12-01)
- unity: builtin — `Reflection Probe > Box Projection (ReflectionProbe.boxProjection)` (evidence: https://docs.unity3d.com/6000.0/Documentation/ScriptReference/ReflectionProbe-boxProjection.html, checked 2026-12-01)
- unreal: builtin — `Place a Box Reflection Capture actor` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/reflections-captures-in-unreal-engine, checked 2026-12-01)

## Dataflow

- Inputs: hdr-image, gbuffer
- Outputs: radiance
- Platforms: webgl2, webgpu, desktop-gpu, mobile-gpu, unity, unreal, godot

## Presets

### Box-projected vs plain cubemap floor reflection (glsl-fragment; rendered 2026-11-29)

```json
{
  "box_min": [
    -4,
    -1,
    -4
  ],
  "box_max": [
    4,
    3,
    4
  ],
  "probe": [
    0,
    1,
    0
  ]
}
```

```glsl
// 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

## Lineage

- extends [Environment mapping, cubemaps and skyboxes](https://texelatlas.vercel.app/t/environment-mapping-cubemaps.md)

## Combines with

- [Split-Sum Image-Based Lighting](https://texelatlas.vercel.app/t/split-sum-ibl.md): 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](https://texelatlas.vercel.app/t/ground-truth-specular-occlusion.md): Supplies the per-pixel occlusion factor that hides probe reflections inside crevices the cubemap cannot know about.
- [Screen-space reflections](https://texelatlas.vercel.app/t/screen-space-reflections.md): SSR overrides the probe where the screen has a hit and the probe fills in misses and off-screen content.

## Sources

1. [primary] Sébastien Lagarde Image-based Lighting approaches and parallax-corrected cubemap. seblagarde.wordpress.com. https://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap (verified via http on 2026-11-29)
2. [talk] Sébastien Lagarde, Charles de Rousiers Moving Frostbite to Physically Based Rendering. SIGGRAPH 2014 course. https://seblagarde.wordpress.com/wp-content/uploads/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf (verified via http on 2026-11-29)
3. [implementation] mrdoob (2010) mrdoob/three.js. https://github.com/mrdoob/three.js License: MIT. (verified via github on 2026-11-29)

## Cite this entry

Texel. "Reflection probes with parallax-corrected cubemaps." https://texelatlas.vercel.app/t/reflection-probes-parallax-corrected-cubemaps/ (accessed 2026-12-01).
