Repository navigation
Fix saved snapshot aspect ratio to match preview - #6385
Merged
Merged
Conversation
akleshchev
approved these changes
Sep 29, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The aspect-ratio calculation and cleanup paths are consistent and correctly scoped.
Review effort: Balanced
Findings: None
What changed in this PR
Aligns saved snapshots with their preview framing when using wider aspect ratios.
Changes:
- Adjusts the temporary camera FOV for wide snapshots without simulator broadcasts.
- Centralizes restoration of camera and deferred-rendering state, including failure paths.
| File | Description |
|---|---|
indra/newview/llviewerwindow.cpp |
Corrects wide snapshot framing and reliably restores temporary rendering state. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Fixed: #6382
This PR simply fixes snapshots at a different aspect ratio than the viewer's window, which was causing the snapshot to be zoomed out compared to the preview. It does this by adjusting the camera's field of view to match the preview's crop without broadcasting it to the simulator.
Additionally, I also made sure the camera and screen buffer are always restored afterward AND when an early return happens. Previously, if an early return was hit and reset_deferred was true, it never restored them.
Note:
if (image_aspect > window_aspect)is done on purpose because from my own testing, if the aspect ratio is smaller than the window, such as doing a vertically tall snapshot, the issue did not occur.Screenshots of the change working: