fix: preserve aspect-correct viewport for screen effects#1213
fix: preserve aspect-correct viewport for screen effects#1213xXJSONDeruloXx wants to merge 1 commit intoutkarshdalal:masterfrom
Conversation
📝 WalkthroughWalkthroughA single-line addition to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
9d08c33 to
c060ba7
Compare
phobos665
left a comment
There was a problem hiding this comment.
Seems sensible. Thanks for fixing.
Description
prevents screen effects from incorrectly altering aspect ratio when applied, fix up from internal and external resolution decouple with FSR work
Recording
Checklist
#code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.CONTRIBUTING.md.Summary by cubic
Preserves the aspect-correct viewport when screen effects are enabled. Marks the viewport as dirty so the renderer restores the scene viewport each frame and non-scaling effects no longer stretch to the full surface.
EffectComposer.render(), callrenderer.setViewportNeedsUpdate(true)after binding the scene FBO and settingglViewport, soGLRenderer.drawScene()reapplies the aspect-correct viewport after effect passes override it.Written for commit c060ba7. Summary will update on new commits.
Summary by CodeRabbit