Skip to content

fix: PT-9b - honest variance for unseedable disocclusions; 7x7 borrow#97

Merged
proggeramlug merged 1 commit into
mainfrom
fix/pt9b-translation-band
Jul 15, 2026
Merged

fix: PT-9b - honest variance for unseedable disocclusions; 7x7 borrow#97
proggeramlug merged 1 commit into
mainfrom
fix/pt9b-translation-band

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

The PT-9 seeding handled ROTATION, where a few pixels per frame stream
in at the screen edge next to converged history. Under TRANSLATION -
the actual walking-indoors case - a whole COLUMN of texels streams in
per frame, the 5x5 borrow window finds nothing but fellow newborns,
and the unseeded pixels fell back to the old degenerate state: a raw
1-spp sample with variance EXACTLY zero (m2 - m1 squared of a single
value). Zero variance tells the wavelet filter the pixel is CONVERGED,
so the raw outliers survived all four a-trous iterations as a visible
noise band along the leading screen edge.

Two changes, both in the temporal kernel, realtime mode only:

  • the borrow window grows to 7x7 (newborn pixels only, so the cost is
    motion-proportional and small);
  • a newborn with NOTHING to borrow now writes a frank variance
    (max(l squared, 0.25)) instead of the degenerate zero - a 1-sample
    estimate has unknown variance, not none - so the a-trous blurs those
    pixels hard until real statistics exist one frame later.

Verified: both golden PT tests pass; the translating-dolly capture
(sideways translation, worst-case parallax) shows the noise band gone
at unchanged fps; progressive mode untouched.

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

Summary by CodeRabbit

  • Bug Fixes
    • Improved real-time path-traced rendering during fast camera movement.
    • Reduced disocclusion artifacts by making better use of nearby compatible visual history.
    • Improved handling of newly revealed areas, producing more stable noise and variance estimates.
    • Enhanced image quality and temporal stability in scenes with significant camera translation.

The PT-9 seeding handled ROTATION, where a few pixels per frame stream
in at the screen edge next to converged history. Under TRANSLATION -
the actual walking-indoors case - a whole COLUMN of texels streams in
per frame, the 5x5 borrow window finds nothing but fellow newborns,
and the unseeded pixels fell back to the old degenerate state: a raw
1-spp sample with variance EXACTLY zero (m2 - m1 squared of a single
value). Zero variance tells the wavelet filter the pixel is CONVERGED,
so the raw outliers survived all four a-trous iterations as a visible
noise band along the leading screen edge.

Two changes, both in the temporal kernel, realtime mode only:
- the borrow window grows to 7x7 (newborn pixels only, so the cost is
  motion-proportional and small);
- a newborn with NOTHING to borrow now writes a frank variance
  (max(l squared, 0.25)) instead of the degenerate zero - a 1-sample
  estimate has unknown variance, not none - so the a-trous blurs those
  pixels hard until real statistics exist one frame later.

Verified: both golden PT tests pass; the translating-dolly capture
(sideways translation, worst-case parallax) shows the noise band gone
at unchanged fps; progressive mode untouched.

Claude-Session: https://claude.ai/code/session_018574BdCfSjdpNK3WLgx1hP
@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: 8340792e-ee3a-4361-bbbd-f13d53a8003b

📥 Commits

Reviewing files that changed from the base of the PR and between 6a5d63d and dd5644d.

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

📝 Walkthrough

Walkthrough

The PT shader’s SVGF accumulation path expands disocclusion neighbor searches from 5×5 to 7×7, tracks successful history seeding, and applies a fallback variance estimate for young unseeded history.

Changes

SVGF seeding updates

Layer / File(s) Summary
Neighbor seeding and variance handling
native/shared/src/renderer/shaders/pt.rs
The shader tracks successful neighbor-history seeding, expands the disocclusion search window, and derives variance from l_new*l_new with a floor for very young unseeded history.

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/pt9b-translation-band

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.

@proggeramlug proggeramlug merged commit 491d9de into main Jul 15, 2026
7 of 10 checks passed
@proggeramlug proggeramlug deleted the fix/pt9b-translation-band branch July 15, 2026 12:16
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