fix(TAA): restore VR per-eye reprojection and opaque alpha#84
Conversation
PR community-shaders#2399 (upstream) replaced the high-level TAA implementation with a faithful SE decompile transcription, but dropped two VR-specific behaviors that Open Shaders' combined-eye render target depends on: 1. Per-eye reprojection. Vanilla VR renders eyes to separate targets, so plain texCoord+velocity is safe there; Open Shaders packs both eyes in one RT, so a pixel near the x=0.5 seam sampled the other eye's history (cross-eye ghosting). Restored Stereo::ApplyVelocityToUV plus the per-eye history clamp via GetPreviousDynamicResolutionAdjustedScreen- Position, and fed its mono-space out-of-bounds flag into the history reject (the stereo-space [0,1] test missed the seam). 2. Output alpha. The VR branch wrote colorOut.w = allTransparent ? 1 : 0, so opaque pixels (nearly the whole frame) got alpha 0. Restored the vanilla decompile behavior (o0.w = 1) on both editions. Both changes are guarded by #ifdef VR; the SE path is byte-identical. Validated with fxc ps_5_0 across flat / VR / HDR / VR+HDR permutations. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 52 minutes and 47 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds VR-specific stereo reprojection and disocclusion detection to temporal anti-aliasing. The shader now conditionally applies per-eye history UV reprojection via VR helpers, uses per-eye out-of-bounds flags instead of SE-only clamping for mask rejection, and consistently outputs opaque alpha. ChangesVR Temporal Anti-Aliasing Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
No actionable suggestions for changed features. |
There was a problem hiding this comment.
Pull request overview
Restores VR-specific Temporal AA behavior in ISTemporalAA.hlsl to prevent cross-eye history sampling when using a combined-eye render target, and to ensure the TAA output alpha matches vanilla expectations.
Changes:
- Add VR-only per-eye reprojection via
Stereo::ApplyVelocityToUVand feed its mono-space out-of-bounds result into history rejection. - Use
FrameBuffer::GetPreviousDynamicResolutionAdjustedScreenPositionfor VR history UV clamping to keep clamping per-eye under dynamic resolution. - Write opaque alpha unconditionally (
colorOut.w = 1) for both SE and VR paths.
Condense the reprojection/reject why-comments per CLAUDE.md concise-comment guidance. Comment-only; compiled bytecode unchanged across all permutations.
Problem
Upstream PR community-shaders#2399 (
fix(TAA): banding and oversharpening, commit7cc80382) replaced the high-level TAA implementation with a faithful SE decompile transcription. The unified math is correct (it matches the VR decompile too), but the rewrite dropped two VR-specific behaviors that Open Shaders' combined-eye render target depends on, breaking TAA in VR.Fixes (both
#ifdef VR-only — SE path is byte-identical)Per-eye reprojection. Vanilla VR renders eyes to separate targets, so plain
texCoord + velocityis safe there. Open Shaders packs both eyes into one RT, so a pixel near thex=0.5seam sampled the other eye's history → cross-eye ghosting. RestoredStereo::ApplyVelocityToUV+ the per-eye history clamp viaGetPreviousDynamicResolutionAdjustedScreenPosition, and fed its mono-space out-of-bounds flag into the history reject (the stereo-space[0,1]test missed the seam).Output alpha. The surviving VR branch wrote
colorOut.w = allTransparent ? 1 : 0, so opaque pixels (nearly the whole frame) got alpha0. Restored the vanilla decompile behavior (o0.w = 1) on both editions.Notes
Validation
fxc ps_5_0clean (exit 0, no warnings) across flat / VR / HDR / VR+HDR permutations.COPY_SHADERSto SE + VR Data dirs; in-game VR verification pending.🤖 Generated with Claude Code
Summary by CodeRabbit