-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
cm: scale reference luminance when tonemapping #12216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Does it work as expected with overriden monitorv2 luminances? Hyprland/src/render/shaders/glsl/CM.glsl Lines 374 to 408 in 46b71ed
|
|
@UjinT34 We throw that info away in the Hyprland/src/render/OpenGL.cpp Line 1713 in 46b71ed
I rocked the boat more with #12204, but even then I forced the luminanances to match the transfer function with Because monitorv2 settings would make an impact otherwise, and I'm not sure it'd ever be in a good way. Edit: It'd probably be better to do the same luminance override in this branch |
|
Do the |
A monitor should provide those values through EDID. Sometimes EDID can't be fully parsed or the values are incorrect. Those monitorv2 rules are meant to fix that. |
|
Interestingly enough, sharing a screen with HDR on works for normal windows with this PR, but in Marvel's Spider-Man Remastered on Steam the game looks undersaturated in the screenshare when focused on the window and slightly overly bright when focused away with |
|
@s0mebodyhelpme I've seen most of the issues you described with These changes just address better conversion when we correctly make the determination that we want to share HDR, but it does seem like there's an issue with making that determination somewhere in the pipeline. I'm surprised to see the issue with |
|
@njdom24 im not sure if the issue with mpv is actually to do with direct scanout, as I have that set to 0, but I can try using both patches to see if that resolves the issue on my end. On another note, though, I am glad you're working on this. Willing to test out any future changes and report back if you welcome it. |
|
@s0mebodyhelpme If you don't have direct scanout enabled, the linked PR won't improve things, unfortunately. I'll see if I can reproduce it. |
383ff89 to
499c2e1
Compare
|
@njdom24 Update: Edit: Also, screensharing an HDR game like Spider-Man Remastered looks right ONLY if focus is away from the window? |
|
@s0mebodyhelpme Are you sharing the window or the screen? All of my testing has been with the screen |
|
@njdom24 i noticed this on sharing a window, but it also becomes undersaturated when focused on the same app during sharing the screen (I know because I viewed the stream on a separate device). |
Describe your PR, what does it fix/add?
Simpler alternative to #12204
When tonemapping from HDR to SDR, scale the HDR source's reference luminance (203) to SDR (80). Prevents HDR screenshare from blowing out the brightness.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Unlike #12204, this method makes games typically look closer to how they do in SDR, at the risk of losing highlight detail that a game's native tonemapper might prioritize better.
Screenshots are of an extremely bright area, sort of a worst-case scenario, to emphasize the difference.
HDR-to-SDR on

master:HDR-to-SDR with this PR:

Native SDR:

Also brings in a quick fix for #12094, which made screensharing too dark when
render:cm_sdr_eotf> 0, which became apparent when testing this.Is it ready for merging, or does it need work?
Heavily WIP