Conversation
|
hyprsunset temperature and gamma are still unable to apply whilst in a DS scenario. However you're able to go out of fullscreen, do whatever with hyprsunset, and then fullscreen again with ds and hyprsunset still working edit: |
|
Ok lets be clear about the blue light filters here, I personally don't ever want hyprsunset to work on DS, or rather video/game content that is fullscreen. I have 4 monitors and want to dim 3 of those with ctm when playing a fullscreen game or watching a fullscreen video, but the fullscreen thing should never have ctm/shaders/blue light filters applied to it, it needs to be fully lit with accurate colors. Optionally of course, some might want it orange. |
I agree but there were a lot of complains about broken hyprsunset the last time. I'll add a setting to control that |
|
Should work as expected by default. Those who want hyprsunset always on should set If hyprsunset doesn't apply in fullscreen when it should I'll need some steps to reproduce with some additional info. It behaves differently depending on HL and source CM settings. |
|
Amazing, thx. Personally I agree not to use blue light filters when gamin but the gamma control is nice when it's needed. |
|
Can you make this be on top of current API fixes? |
already is on top |
|
CURRENT. Missing 2 commits and a rebase. |
cb966ac to
052f68c
Compare
|
@fxzzi If you have two pictures A and B with different saturation you can call A correct and B washed out or A oversaturated and B correct. If you have Blur artifacts with fp16 are caused by color values going outside 0.0-1.0 range and being incorrectly clamped when something in the pipeline isn't using both fp16 and CM for the input values. Toggling fp16 invalidates blur buffers but doesn't mark blur as dirty leaving it in incorrect state. If this happens you'll see the difference between tiled and floating blur. Blur with fp16 is significantly lighter and I couldn't figure out why. Might be actually more correct because the values aren't clamped and packed into a smaller range. Default HL internals might cause an unwanted conversion into 8bit somewhere, most of the code lets gl autodetect some internal properties and in general is tailored towards 8bpc. |
Whilst this is a fair assumption I forgot to mention that the reason I'm using srgb in hyprland is because I am instead using the srgb callibrated mode on my monitor for now, as there is a firmware bug with custom modes which crush a lot of the blacks together. This means the colours are clamped to srgb by my monitor, and I in most cases am comfortably able to regard one scene as correct and one as incorrect. When using "edid" or "dcip3" cm with a regular mode on my monitor the colours are similar to srgb with monitor clamping. I can test and see if all these scenarios still occur when using one of these cm modes instead if you'd like.
This was from a fresh launch of hyprland |
|
Couldn't replicate blur artifacts. It's either specific to some HL settings or the wallpaper itself was recoded during upload and doesn't trigger such artifacts any more.
|
Don't have any specific settings in hyprland related to blur really, the artifacts are also not specific to foot, you can see them in ags bar above, and it also shows on dunst in HDR (fp16 defaults on in HDR) This is the image direct from my wallpapers, maybe it'll happen here. https://gitlab.com/fazzi/walls/-/raw/main/images/730_20251024183732_1.jpg?ref_type=heads with cm=edid bright parts of the wallpaper are coloured incorrectly, not fixed in floating sometimes you can get it into a state where it's only broken if going specifically from floating to fullscreen, instead of tiled to fullscreen. the colours fixing itself near the end of the video in fs is from me doing togglefloating output.mp4you can also see http://www.lagom.nl/lcd-test/black.php for the raised black levels edit: last commit fixed blur in tiled not applying after leaving HDR scenario. editedit:
still able to catch instances where blur completely dies, might be after coming out of a DS scenario (no HDR or anything). `hyprctl reload` gets the blur back
|
|
I believe this simple patch should be added to this. It fixes a variable definition I believe is incorrect (not 100% sure, though :3). |
|
I've recently been getting some damage when certain windows appear or move (plus signs in minecraft when switching workspaces). Not sure if these are caused by API fixes or CM fixes. |
a045157 to
93939c1
Compare
|
|
|
It happens with only gamma22 as well. Gamma22force is the only way I can makea lot of games look correct. Gamma22 alone fixes washed out colours in ff, gtk, older electron, etc. Isn't gamma22 default on kde and gnome? |
|
Can confirm, am on nvidia (single dgpu), rendering is completely cooked for me (massive black patches on screen) without |
|
Something about In HDR mode either in game or even on desktop with The setting actually causing the issues seems to be I think the tonemap commit is perhaps borked... and also afaik this setting shouldn't affect actual HDR games, which are an HDR source? |
|
Is it only me or is setting |
|
@gulafaran "actually apply the tone mapping" thing breaks with overridden target luminances. might be caused by incorrect input (e.g. monitor luminance values aren't sent when they should unless they are overridden or vice versa) @njdom24 please recheck the tonemapping code from #12204. It does some math to get I'll leave the tonemapping code unchanged but it's clearly incorrect since #12204. And those changes probably hide some other issue with incorrectly passed values. |
|
Tonemapping happens when source luminance is significantly higher than the taget luminance. Can happen with HDR content displayed on HDR target. Max source luminance is 10000, max typical hdr monitor luminance is 400-4000. Most modern games have a slider to limit their luminance, older games tend to use 10000. |
|
Hm right, makes sense, I see the |
yea, nv 3090. I'll disable for now then. |
|
Yo so is it just me or is screensharing HDR content still not looking right with this PR? It's too acidic and makes HDR content leveling look wrong in both screen capture and window capture. Also screen capture just pauses on a certain frame after some time, and does not continue capturing after that so you have to restart the client. |
|
This finally fixes incorrect color displayed by electron apps and zed editor for me, great work as always! |
Looks ok to me. Probably some cm settings combo makes it look different. Recorded video might differ from the image displayed by the recording app. |
|
I was testing on mpv and it seems like the cauie was simply Note 2: trying to stream on Discord w/Equibop/native Discord |
I guess since this is visible in screenshots, maybe you can share some to see if what you're seeing is within expectation or not? For me having Here's something I just captured in mpv with two different versions of the same movie, one SDR and one HDR: Screenshot from SDR version of movie: Screenshot from HDR version of movie: As you can see, the HDR screenshot looks a bit overcooked for two reasons: 1) saturation is way high and 2) highlights are blown out. Now ofc how representative the SDR version is of "original creator intent" depends very much on how these two versions of the movie were created, but FWIW in actual viewing on the monitor, while the HDR version has much brighter highlights coming from the windows, it doesn't look functionally that different from the SDR version (including overall scene brightness/saturation). Here's what I think:
|
This however is deffo a bug (exists on main too, I think probably since #13631) that I constantly keep hitting randomly (and others have reprod too I think), no idea what triggers it. I suspect it won't happen if you set Toggling fp16 off and on "unstucks" the frame for me. |
|
@ssareta i see pretty much the same thing you see when comparing a screenshot of an HDR movie to how it is represented on screen whenever played in MPV. Without the tonemapping done by Hyprland, it looks pretty much as it should on my monitor without deleting detail but with screenshotting it using for example grimblast or some other tool it ends up looking wrong (high saturation, acidic, highlights are blown out) and it ends up deleting detail by making blacks too dark. |
|
Right, matches with my experience then. We can wait for Ujin to confirm that I didn't just talk completely out of my ass, but if not yea, I don't really think this is improvable without a better tonemapping alg. It's already an improvement in mpv vs main (which usually has incorrect HDR colours even in actual viewing without some mpv config hackery) I might take a stab at it after this PR if I get bored - I was interested to see if mpv/libplacebo's one is any good, because apparently it should be, but the Uchimura one from the link I shared looks quite nice... it might even be worth implementing multiple and letting ppl pick their favourite via a setting, different ones are probably better for different kinds of content |
|
As for the other issue which you said is a bug, setting |
My changes in #12204 were adapted from KWin's, with some stuff added/removed until it looked decent, which probably meant it relied on bugs/quirks/my misunderstandings that have since been changed. If a pure port of their tonemapper works better with this PR, then please blow away my changes. |
|
Are there any issues with |
I havent noticed any 👍 only fp16 related |
|
everything fine here too. thanks for your work yet again :) tho i do think at all default settings it's really close to just cm_enabled 0. I ended up opting with this on my systems which don't have good displays or HDR and stuff |
|
Same here, equal to or better than main in basically every scenario (even with fp16 = 1). Thanks for the work! |
|
I think we should make fp16 auto enable it in all CM scenarios outside srgb. If we are in srgb, it's useless, but with e.g. wide it would help with sc and stuff. That's just my two cents, outside of that code looks good. |

















Describe your PR, what does it fix/add?
Removes
render:cm_fs_passthrough. DS andrender:cm_auto_hdrshould be used to achieve the same effect. DS and FS passthrough are very similar when it comes to CM and made things too complicated.Fixes
render:non_shader_cminteraction with hyprsunset and similar apps.Changes
render:non_shader_cmdefault to 2 - enabled for DS.Fixes linear luminance math for non-default linear descriptions.
Makes
render:cm_sdr_eotfto actually change the default image description. Should fix some hard to pinpoint srgb <-> gamma22 issues.Adds
render:non_shader_cm_interop. 0 - external ctm is disabled in fullscreen, 1 - external ctm is enabled in fullscreen, 2 - external ctm is disabled for fullscreen photo/video/game content types. 2 is the new default because it doesn't make sense to apply hyprsunset and similar to those content types.Adds
debug:invalidate_fp16to disable fp16 buffer invalidation. Fixes glitches on some systems but reduces performance.Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Needs more testing.
hdr with sdr mods might require
render:use_shader_blur_blend = 1for blurIs it ready for merging, or does it need work?
Ready as is. Any further fixes in separate PRs
cm_sdr_eotfFix screenshare withnot possible for fb copiesuse_fp16 = 0