Skip to content

Fix FXAA pass ignoring RenderResolutionDivisor#311

Merged
RyeMutt merged 1 commit into
AlchemyViewer:developfrom
gwigz:gwigz/fix-render-resolution-divisor
Jun 13, 2026
Merged

Fix FXAA pass ignoring RenderResolutionDivisor#311
RyeMutt merged 1 commit into
AlchemyViewer:developfrom
gwigz:gwigz/fix-render-resolution-divisor

Conversation

@gwigz

@gwigz gwigz commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

With FXAA antialiasing enabled and RenderResolutionDivisor >= 2, the FXAA pass would only write to the lower-left fraction of the reduced-resolution target.

Should help those that may want to keep render HiDPI on but render at a lower resolution.

applyFXAA forced the full world-view viewport before blitting into the
FXAA destination, but that destination is an FBO whose viewport
bindTarget already set. Under RenderResolutionDivisor the reduced-size
target then received output only in its lower-left fraction. Drop the
override and let the bound target's viewport stand.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e8f3d2a0-e866-4dd6-9809-f4f3ac6f8218

📥 Commits

Reviewing files that changed from the base of the PR and between 03a5af0 and 11db3e8.

📒 Files selected for processing (1)
  • indra/newview/pipeline.cpp

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Fixed FXAA anti-aliasing rendering behavior when render resolution divisor settings are applied, ensuring proper viewport handling during the presentation phase and preventing rendering artifacts.

Walkthrough

This PR adjusts the FXAA multisample rendering path in LLPipeline::applyFXAA to remove redundant viewport setup. Instead of explicitly calling glViewport() with full rectangle dimensions, the code now relies on the viewport already configured by dst->bindTarget(), preventing viewport mismatch when RenderResolutionDivisor scales the render target.

Changes

FXAA Multisample Viewport Fix

Layer / File(s) Summary
Multisample FXAA viewport setup
indra/newview/pipeline.cpp
Removes explicit glViewport() reset and adds comments clarifying that dst->bindTarget() already sets the correct viewport for the destination FBO, avoiding redundant calls that could conflict with scaled render targets.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A viewport once doubled and checked with great care,
Now trusts what bindTarget() has placed over there,
No redundant resets on this rendering day,
Just comments so clear light the viewer's way!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description explains the issue and solution but lacks structured sections from the template; it's missing Related Issues link, detailed checklist items, and comprehensive documentation of testing. Add the Related Issues section with a link to the bug report, complete the checklist items, and document testing steps taken to verify the fix.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main fix: resolving the issue where FXAA ignores RenderResolutionDivisor, which directly aligns with the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@RyeMutt RyeMutt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RyeMutt RyeMutt merged commit c67861f into AlchemyViewer:develop Jun 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants