-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Simple color management #9506
base: main
Are you sure you want to change the base?
Simple color management #9506
Conversation
Ready for testing. SDR -> HDR with |
Hi @UjinT34 , I tried to build from this branch but it crash on start up.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might be the problem
just curious question: why are you not using lcms2 like gamescope or weston? |
No idea how to use it in our case. Might be useful for some matrix calculations but most of the work is inside shaders |
seems like this lib support icc, might be useful for next iteration. |
Is it expected for non-HDR content to be really dim when HDR is active? The colors are still correct and look like they do when cm is set to wide, but wide is a bit brighter for SDR content. When cm is set to hdr, the cursor and window borders are very bright, but everything else (except for HDR games) is dim. |
Default white brightness is only 80. Seems to be low for most cases. Will add a configurable multiplier in the future. Borders, hw cursor, blur and some other stuff doesn't have a CM atm. |
I replace 80 to 300 and it looks better. But I agree, configuration like |
Hi, I installed hyprland the other day for the first time and I've been testing this out for a bit. Seems to be a lot better than the previous Should this map SDR programs correctly to BT2020? My browser (and possibly other SDR programs (?)) still seem too saturated. At least oranges seem too red. I don't know color management and color spaces well enough to figure out what exactly the problem is. What I've gathered:
Is this just how it is supposed to work, or are the primaries not being mapped correctly? Maybe it is just the browser doing weird things (?). Though I do not really understand, how would a client outputting sRGB end up looking too saturated on a wider gamut monitor. If the colors are correctly mapped. |
I've tried several simple SDR brightness modifications. The image becomes brighter but I don't like the resulting quality. Probably needs a more sophisticated approach than simple multiplication. A client outputs an integer value. Maximum red in sRGB and maximum red in BT2020 will have the same value. But should look different. |
@9oOzv primaries conversion should work better now |
Great. I think it looks closer now. Though I do still notice some weird tint here and there compared to all my SDR monitor. Some pinks tint towards orange. Some skin tones towards green (I think... quite difficult to say actually other than it looks a bit off still). Different enough for me to believe it is not just calibration issues. Nonetheless, I think with the addition of 'sdr brightness' setting, I think this would make Hyprland much more usable on HDR monitors. |
iirc Plasma has values for sdr brightness and color intensity. This could (at least temporarily) take the burden of calibration away from the maintainers. Making strongly recommended defaults for calibration but letting them be configured could be an easy "out" in terms of figuring out details. But this is just my two cents, and I'm a total compositor/c++ noob |
I think having color intensity config for SDR would be nice at some point, as sRGB colors, even if correctly mapped, can look disappointingly unsaturated compared to wide gamut content on the same screen,. Or compared to the regular SDR monitors, that we are used to and often are much more saturated. But getting the primaries conversion correct should probably be the first step. I do not think it is correct quite yet, but I cannot tell for sure just by looking at the picture. |
general/total brightness is very low, even if colors are improved since the last commit (at least on my monitor) |
At this point I am pretty sure that conversion between primaries with the same white point is correct. No white point compensation for now. Other stuff which happens before and/or after the conversion might throw it off. Added two new monitor rules to control SDR -> HDR brightness and saturation. |
Vivid colors are oversaturated. You might have some monitor settings that compensated that oversaturation and now they cause undersaturation. |
I probably should have described the issue differently. Colors appear to have a yellow tint to them after that commit. For example, shades of pink tends to look like a peach color now. Btw, I check my TV's color settings, and changed the color gamut and gamma curve values and they didn't have an effect on this. |
Looks good to me. I am still not sure if the saturated pinks/magentas are missing or if my other monitors just are not showing true |
This sounds exactly like what I was referring to in my previous comment |
no notes from the last commit. LGTM edit: found this tool that's kinda handy to check how colors look |
upon further checking/testing, there's something weird about greens specifically. Other colors look fine though. edit: yeah it feels either like the greens being undersaturated or as a slight yellow tint as said above, to me |
Ah, I didn't see that at first. Is this happening for you when using auto/wide or only in hdr? For me, it happens in the former. |
I have only tried in HDR. I took a picture of my 3 monitors (top one is an HDR OLED TV (Hyprland), bottom left is an SDR one (Hyprland), Bottom right is SDR (attached to a Windows computer). The problem is quite apparent at some specific colors. |
Just tested, and It is even worse in |
Shouldn't the primary conversion only happen for SDR->HDR and not in SDR-only scenarios, such as auto/wide? |
I think it should happen for You can always use |
Describe your PR, what does it fix/add?
Added a simple CM shader and relevant settings.
New monitor rule
cm
:New monitor rule
sdrbrightness
: brightness multiplier for SDR -> HDR mapping (sane value 1.0 - 2.0)New monitor rule
sdrsaturation
: saturation modifier for SDR -> HDR mapping (sane value 0.9 - 1.1)Removed
experimental:wide_color_gamut
Removed
experimental:hdr
Added
render:cm_fs_passthrough
to disable hdr metadata changes for fullscreen apps to avoid modesetting and black screen during the switchPartially implements #9064
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Desktop HDR has some weird interactions with blur and other effects.
SDR might also have incorrect interactions with blur and other effects. In general should be unnoticeable.
Old shaders are kept in place but no longer used.
New CM shader might be slow.
Some color transformations might be incorrect.
Interaction with screen capture or mirroring was not tested.
TEXTURE_EXTERNAL
isn't supported, probably unused.Is it ready for merging, or does it need work?
Ready for merging.