Skip to content

Fix HDR and Alpha issues in screenshots#7294

Open
MjnMixael wants to merge 1 commit intoscp-fs2open:masterfrom
MjnMixael:fix_screenshot_issues
Open

Fix HDR and Alpha issues in screenshots#7294
MjnMixael wants to merge 1 commit intoscp-fs2open:masterfrom
MjnMixael:fix_screenshot_issues

Conversation

@MjnMixael
Copy link
Contributor

Fixes #7292
Fixes #7293

Clamp color values so we don't get undefined behavior from HDR colors in the png writer.

The opengl blend operations can affect the alpha channel in the framebuffer as a side effect so force the alpha channel to 255 before sending it to the png writer. I'm less inclined to mess with the blend function directly because it's unclear what, if anything, modifies the alpha channel intentionally and that has a much larger blast radius.

@wookieejedi wookieejedi added fix A fix for bugs, not-a-bugs, and/or regressions. graphics A feature or issue related to graphics (2d and 3d) labels Mar 16, 2026
@wookieejedi
Copy link
Member

I vote for this to be a point release canidate, but I'll defer to @BMagnu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A fix for bugs, not-a-bugs, and/or regressions. graphics A feature or issue related to graphics (2d and 3d)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Screenshots can't handle HDR lighting very well screenshots get saved with transperancy for some bizarre reason.

2 participants