Skip to content

TAA: motion-aware disocclusion edge (sparkle slice 1); unjittered-current is slice 2 - #113

Merged
proggeramlug merged 1 commit into
mainfrom
fix/taa-rest-sparkle
Jul 16, 2026
Merged

TAA: motion-aware disocclusion edge (sparkle slice 1); unjittered-current is slice 2#113
proggeramlug merged 1 commit into
mainfrom
fix/taa-rest-sparkle

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

First measured slice of the rest-sparkle fix. The disocclusion reject's tight 0.25σ lower edge oscillated alpha on jittered static detail — now 0.6σ at rest, 0.25σ under motion (its reason to exist), chroma-flush intact. Measured: bank 3.99→3.83, grass 3.46→3.27.

The dominant term is identified for slice 2: the resolve samples the current frame at its jittered position (no unjitter offset), so α×jitter-difference shimmers into every frame by construction. Needs jitter in TaaParams + care at rs<1 (TSR uses jitter for super-resolution). Rig + baselines in the shooter: tools/f12-live.ps1, archived captures tools/.testout/v2-*.png.

Summary by CodeRabbit

  • Bug Fixes
    • Improved temporal anti-aliasing during disocclusion events.
    • Adjusted visual rejection thresholds based on motion to reduce artifacts when scenes are stationary or moving.

…e rest-sparkle

The temporal-variance rig (shooter tools/f12-live.ps1 + high-pass
stddev over 5 live captures) showed TAA ADDING flicker on static
detailed surfaces vs TAA-off (bank 3.99 vs 1.94, grass 3.46 vs 1.03).
Two mechanisms found:

1. FIXED HERE: the disocclusion reject's 0.25-sigma lower edge - at
   rest, sub-pixel jitter walks pebble/grass detail across it every few
   frames, oscillating alpha between converged history and raw frame.
   Rest pixels now need 0.6 sigma (motion keeps 0.25; the chroma-poison
   flush still fires at ~1 sigma). Measured: bank 3.99 -> 3.83, grass
   3.46 -> 3.27. Real, small.

2. THE DOMINANT TERM, identified and left for its own change:
   sample_catmull_rom(in.uv) samples the CURRENT frame at its jittered
   position - the resolve never unjitters, so alpha x jitter-difference
   shimmers into every output frame by construction (~0.1 x edge
   contrast at rest). Fix = pass the frame's jitter through TaaParams
   (padding fields free) and offset the current sample - with care at
   rs < 1 where TSR uses jitter as its super-resolution source.
@proggeramlug
proggeramlug merged commit 48c9fb4 into main Jul 16, 2026
@proggeramlug
proggeramlug deleted the fix/taa-rest-sparkle branch July 16, 2026 16:21
@coderabbitai

coderabbitai Bot commented Jul 16, 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: 27f16e7f-fec3-41f3-8533-d2aaabed5930

📥 Commits

Reviewing files that changed from the base of the PR and between ec69e80 and 98bf6df.

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

📝 Walkthrough

Walkthrough

The TAA shader’s disocclusion rejection threshold now uses motion to adjust its lower variance bound, while preserving the existing upper bound.

Changes

TAA threshold adjustment

Layer / File(s) Summary
Motion-aware rejection threshold
native/shared/src/renderer/shaders/post.rs
The lower smoothstep edge changes from a fixed stddev.x * 0.25 value to stddev.x * mix(0.6, 0.25, motion_alpha); the upper edge remains stddev.x * 1.0.

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

✨ 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/taa-rest-sparkle

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