Skip to content

feat: ReflectionProbeNode — zone-based IBL override composable (3.3.0)#677

Merged
ThomasGorisse merged 1 commit intomainfrom
feat/reflection-probe-node
Mar 20, 2026
Merged

feat: ReflectionProbeNode — zone-based IBL override composable (3.3.0)#677
ThomasGorisse merged 1 commit intomainfrom
feat/reflection-probe-node

Conversation

@ThomasGorisse
Copy link
Contributor

Summary

  • ReflectionProbeNode@Composable that overrides the scene's indirect light (IBL) with a baked cubemap for a defined zone
    • Global mode (radius <= 0): always applies the IBL — useful as a scene-wide environment override
    • Local zone mode (radius > 0): only applies when the camera is within radius metres of position
    • DisposableEffect restores the previous IndirectLight on disposal — safe to compose/decompose
    • priority parameter reserved for future multi-probe blending
  • SceneScope DSL wrapper: ReflectionProbeNode(environment, position, radius, priority)
  • samples/reflection-probe — metallic sphere with global IBL probe applied from sky_2k.hdr; orbit camera; demonstrates the reflections updating as the environment changes

Roadmap

Closes 3.3.0 item: ReflectionProbeNode.

Test plan

  • Build :samples:reflection-probe:assembleDebug
  • Metallic sphere shows correct environment reflections
  • Swap environment at runtime — reflection updates on next recomposition
  • Remove ReflectionProbeNode — previous IBL restored
  • CI passes

🤖 Generated with Claude Code

@ThomasGorisse ThomasGorisse force-pushed the feat/reflection-probe-node branch from 4274a98 to 436ce1c Compare March 20, 2026 19:29
Implements ReflectionProbeNode as a @composable that overrides a Filament
scene's IndirectLight with a baked HDR Environment, either globally or
within a spherical zone around a world-space position.

- sceneview/…/node/ReflectionProbeNode.kt — standalone composable;
  evaluates camera-vs-zone distance each frame via SideEffect, restores
  the previous IndirectLight on disposal
- SceneScope.kt — adds ReflectionProbeNode DSL wrapper with full KDoc
- samples/reflection-probe/ — new sample: metallic sphere + HDR sky IBL
  driven by a global ReflectionProbeNode; reuses sky_2k.hdr from model-viewer
- settings.gradle — includes :samples:reflection-probe

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ThomasGorisse ThomasGorisse force-pushed the feat/reflection-probe-node branch from 436ce1c to 0e4c737 Compare March 20, 2026 19:33
@ThomasGorisse ThomasGorisse merged commit 3e9d99e into main Mar 20, 2026
2 checks passed
@ThomasGorisse ThomasGorisse deleted the feat/reflection-probe-node branch March 20, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant