Skip to content

Comments

Fixed Windows scRGB screenshots + Game Brightness#14

Merged
rrtt217 merged 2 commits intorrtt217:masterfrom
XgarhontX:master
Feb 18, 2026
Merged

Fixed Windows scRGB screenshots + Game Brightness#14
rrtt217 merged 2 commits intorrtt217:masterfrom
XgarhontX:master

Conversation

@XgarhontX
Copy link
Collaborator

@XgarhontX XgarhontX commented Feb 18, 2026

On Windows, scRGB screenshots were incorrectly affected by Game Brightness when != 80.
(WearyOlly confirmed it's not on Linux.)
TODO: rgba16unorm

Fix:

// RGBA16F.
for (int c = 0; c < 4; c++) {
    bits = mappedView.data().getShort(basePos + c * 2);
    datas[c] = Float.float16ToFloat(bits);
    if (System.getProperty("os.name").startsWith("Windows")) datas[c] *= 80.f / config.customGamePaperWhiteBrightness; //Fixes Game Brightness scaling for Windows.
}

Copy link
Owner

@rrtt217 rrtt217 left a comment

Choose a reason for hiding this comment

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

Omg I forgot to do that, but the condition you uses is technologically incorrect

@rrtt217
Copy link
Owner

rrtt217 commented Feb 18, 2026

RGBA16UNORM is only functional on PQ transfer function, and for Rec.2100 PQ no transformation is actually needed, wysiwyg.

@rrtt217 rrtt217 self-requested a review February 18, 2026 03:25
@rrtt217 rrtt217 merged commit 5b80a0d into rrtt217:master Feb 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants