Skip to content

Conversation

@njdom24
Copy link
Contributor

@njdom24 njdom24 commented Nov 2, 2025

Describe your PR, what does it fix/add?

This PR is targetting screenshare.

Inspired by KWin. Updates the tonemapper to use the src imageDescription's luminance info instead of throwing it away. Also scares the reference luminance to match that of the destination, preventing over-bright screenshots / recordings.

Also tossed in a quick fix missed from #12094, which prevents overly-dark screenshares in SDR when render:cm_sdr_eotf > 0.

HDR screenshot tonemapped to SDR:
hdr_to_sdr

SDR screenshot:
reg_sdr

I also considered a simple luminance multiplier as a proof-of-concept when getting started. This is what that would look like by keeping the current tonemap and simply multiplying the end result by 80.0 / 203.0:
image

Versus this PR:

image

FWIW, The first image is actually closer to how this game in particular looks in SDR.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

I'm not super confident in the "correctness" of tonemapper changes (really just looked at prior art), but it does improve HDR screenshares immensely.

Is it ready for merging, or does it need work?

Ready for testing. I want to take some time to look over it again myself though.

@njdom24 njdom24 force-pushed the screenshare-cm-brightness branch from 3df2f92 to 5e53f84 Compare November 4, 2025 06:52
@njdom24 njdom24 changed the title cm: scale reference luminance when tonemapping cm: higher-quality tonemapping Nov 4, 2025
@njdom24 njdom24 force-pushed the screenshare-cm-brightness branch from 5e53f84 to 3f2aefa Compare November 5, 2025 03:59
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.

1 participant