Skip to content

fix: PT-9 - SVGF disocclusion seeding + ReSTIR default-on (indoor motion noise)#96

Merged
proggeramlug merged 1 commit into
mainfrom
fix/pt9-disocclusion-seeding
Jul 15, 2026
Merged

fix: PT-9 - SVGF disocclusion seeding + ReSTIR default-on (indoor motion noise)#96
proggeramlug merged 1 commit into
mainfrom
fix/pt9-disocclusion-seeding

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

A true disocclusion started from the raw 1-spp sample with variance
EXACTLY zero (m2 - m1 squared of a single value), so freshly
streamed-in pixels - the whole viewport periphery whenever the camera
translates - showed raw path noise until history rebuilt. Indoors
(bounce-dominated light, the shooter house) that read as a
salt-and-pepper ring around a clean centre, worst at low frame rates
where history rebuilds slowest.

A newborn pixel usually sits next to texels holding converged history
for the very same surface: the wall streaming in at the screen edge
continues inward. accum[] and moments[] are the previous frame
buffers, race-free to read at any texel, so the temporal kernel now
borrows from depth-consistent, converged (n >= 4) neighbours in a 5x5
window, weighted by history length, and inherits half their history
(capped at 8) - the canonical 1/N blend then folds real fresh samples
in over the next frames. A pixel with no depth-compatible neighbour (a
genuinely new surface rounding a doorway) keeps the honest raw start.
Realtime mode only; progressive accumulation is untouched.

ReSTIR DI (PT-4) flips to ON by default: interiors carry 7+ point
lights and uniform 1-of-N NEE picks the light that matters for a pixel
~6% of the time; the indoor A/B showed a visible win at no measurable
frame cost (24 vs 25 fps). BLOOM_PT_RESTIR=0 restores plain NEE.

Verified: golden_pt_progressive + golden_pt_realtime_motion both pass;
panning indoor capture (shooter INDOORCAM harness) shows the
disocclusion band gone at unchanged fps; outdoor RT full-run smoke
clean.

Claude-Session: https://claude.ai/code/session_018574BdCfSjdpNK3WLgx1hP

Summary by CodeRabbit

  • New Features

    • ReSTIR direct illumination is now enabled by default for path-traced rendering, while remaining configurable through the existing environment setting.
  • Bug Fixes

    • Improved temporal accumulation in disoccluded areas to reduce visual artifacts and preserve more reliable lighting history.
    • Added fallback history seeding from nearby valid samples when standard reprojection cannot find a match.

A true disocclusion started from the raw 1-spp sample with variance
EXACTLY zero (m2 - m1 squared of a single value), so freshly
streamed-in pixels - the whole viewport periphery whenever the camera
translates - showed raw path noise until history rebuilt. Indoors
(bounce-dominated light, the shooter house) that read as a
salt-and-pepper ring around a clean centre, worst at low frame rates
where history rebuilds slowest.

A newborn pixel usually sits next to texels holding converged history
for the very same surface: the wall streaming in at the screen edge
continues inward. accum[] and moments[] are the previous frame
buffers, race-free to read at any texel, so the temporal kernel now
borrows from depth-consistent, converged (n >= 4) neighbours in a 5x5
window, weighted by history length, and inherits half their history
(capped at 8) - the canonical 1/N blend then folds real fresh samples
in over the next frames. A pixel with no depth-compatible neighbour (a
genuinely new surface rounding a doorway) keeps the honest raw start.
Realtime mode only; progressive accumulation is untouched.

ReSTIR DI (PT-4) flips to ON by default: interiors carry 7+ point
lights and uniform 1-of-N NEE picks the light that matters for a pixel
~6% of the time; the indoor A/B showed a visible win at no measurable
frame cost (24 vs 25 fps). BLOOM_PT_RESTIR=0 restores plain NEE.

Verified: golden_pt_progressive + golden_pt_realtime_motion both pass;
panning indoor capture (shooter INDOORCAM harness) shows the
disocclusion band gone at unchanged fps; outdoor RT full-run smoke
clean.

Claude-Session: https://claude.ai/code/session_018574BdCfSjdpNK3WLgx1hP
@proggeramlug proggeramlug merged commit 6a5d63d into main Jul 15, 2026
7 of 10 checks passed
@proggeramlug proggeramlug deleted the fix/pt9-disocclusion-seeding branch July 15, 2026 10:36
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 34ef5dd6-bf49-4814-982a-ea0dc42b43b8

📥 Commits

Reviewing files that changed from the base of the PR and between 5720b6a and 2fe9641.

📒 Files selected for processing (2)
  • native/shared/src/renderer/mod.rs
  • native/shared/src/renderer/shaders/pt.rs

📝 Walkthrough

Walkthrough

The renderer now enables ReSTIR DI by default and seeds missing SVGF temporal history from valid neighboring trace texels during path tracing.

Changes

Renderer path tracing

Layer / File(s) Summary
Enable ReSTIR DI by default
native/shared/src/renderer/mod.rs
BLOOM_PT_RESTIR now remains enabled when unset or set to any value other than 0.
Seed SVGF disocclusion history
native/shared/src/renderer/shaders/pt.rs
The no-tap-matched path scans a 5x5 neighborhood for depth-consistent converged texels, seeds color and moment history, and caps inherited history at 8 after halving it.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pt9-disocclusion-seeding

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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