Hybrid reflections: ray-traced fallback where SSR misses (off-screen / occluded content) #859

Closed
opened 2026-10-19 02:26:45 +00:00 by sky_line · 2 comments
Owner

Problem: SSR can only reflect what is on screen. With the SSR hit test fixed (thickness-tested hits, no more smeared copies), surfaces that should reflect something off-screen or hidden fall back to the reflection probe. For example, a wall next to your avatar should reflect the side of your body facing it, but the camera only sees you from above. The result shows as a misshapen probe-coloured hole where the reflection should be.

Approach (hybrid, to save RT time):

  • SSR first: keep SSR as the primary reflection.
  • RT on failure only: where SSR has no confident answer (miss, rejected hit, off-screen, behind an occluder) and the surface is smooth enough to need a sharp reflection (roughness below a threshold), trace a real reflection ray against the scene TLAS, which already includes avatars for RT shadows.
  • Cheap hit shading:
    • base colour / material from the existing RT material tables;
    • sun / moon with its RT shadow ray, or the cascade lookup;
    • ambient from the probe at the hit point;
    • emissive.
  • Everything else unchanged: rough surfaces keep the probe; pixels where SSR succeeded stay SSR.
  • Budget:
    • only on the pixels SSR rejects;
    • optionally half resolution with an edge-aware upsample;
    • a max ray distance;
    • denoise / temporal accumulation as with the RT shadow mask.
  • Pipeline: prefer doing this in a compute pass (the split deferred lighting already has a reflection pass) rather than adding ray queries to the main lit fragment shader (#849 is about moving those out for compile cost).
  • Settings: RT on, plus its own setting, default on with RT. It stands down with RT under VRAM pressure like the other RT consumers.

Later: full RT reflections (not hybrid) as a separate quality tier.

Done when:

  • Reflections of off-screen / occluded geometry (avatar sides in a wall, objects behind the camera in a mirror-like floor) render from RT instead of the probe hole.
  • SSR-hit pixels look the same as today.
  • Cost measured with GPU timers in typical scenes; target well under 0.5 ms on an RTX 3060-class card.
**Problem:** SSR can only reflect what is on screen. With the SSR hit test fixed (thickness-tested hits, no more smeared copies), surfaces that should reflect something off-screen or hidden fall back to the reflection probe. For example, a wall next to your avatar should reflect the side of your body facing it, but the camera only sees you from above. The result shows as a misshapen probe-coloured hole where the reflection should be. **Approach (hybrid, to save RT time):** - **SSR first:** keep SSR as the primary reflection. - **RT on failure only:** where SSR has no confident answer (miss, rejected hit, off-screen, behind an occluder) and the surface is smooth enough to need a sharp reflection (roughness below a threshold), trace a real reflection ray against the scene TLAS, which already includes avatars for RT shadows. - **Cheap hit shading:** - base colour / material from the existing RT material tables; - sun / moon with its RT shadow ray, or the cascade lookup; - ambient from the probe at the hit point; - emissive. - **Everything else unchanged:** rough surfaces keep the probe; pixels where SSR succeeded stay SSR. - **Budget:** - only on the pixels SSR rejects; - optionally half resolution with an edge-aware upsample; - a max ray distance; - denoise / temporal accumulation as with the RT shadow mask. - **Pipeline:** prefer doing this in a compute pass (the split deferred lighting already has a reflection pass) rather than adding ray queries to the main lit fragment shader (#849 is about moving those out for compile cost). - **Settings:** RT on, plus its own setting, default on with RT. It stands down with RT under VRAM pressure like the other RT consumers. **Later:** full RT reflections (not hybrid) as a separate quality tier. **Done when:** - [ ] Reflections of off-screen / occluded geometry (avatar sides in a wall, objects behind the camera in a mirror-like floor) render from RT instead of the probe hole. - [ ] SSR-hit pixels look the same as today. - [ ] Cost measured with GPU timers in typical scenes; target well under 0.5 ms on an RTX 3060-class card.
sky_line added this to the Slipstream project 2026-10-19 02:26:45 +00:00
Author
Owner

Follow-up filed: #860, RT mirrors (replace the planar hero-mirror render once full RT reflections exist).

Follow-up filed: #860, RT mirrors (replace the planar hero-mirror render once full RT reflections exist).
Author
Owner

Shipped in 1.4.0 Beta 1 (cost reductions in Beta 2). Closing; reopen if it misbehaves.

Shipped in 1.4.0 Beta 1 (cost reductions in Beta 2). Closing; reopen if it misbehaves.
sky_line 2026-10-20 15:03:21 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#859
No description provided.