-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
KDE HDR makes the effects very dark #432
Comments
Hi there! Thanks for the report. However, I have no way to test this on my end. Also, I tried reaching out to the KWin developers on Matrix but didn't get any reply. So I am not sure how to proceed here. I'll try to ask them again. Since this HDR support is pretty new and still kind of experimental, it's hard to find any documentation about it. Maybe if more people start using Plasma 6 and HDR, more will experience this issue and at some point someone will show up who has the knowledge to fix it 🤔 |
I have a framework 13 laptop (AMD) with this issue. What's interesting is that it doesn't support HDR. I'm on Arch/KDE as well and I only see this when using Wayland. When using X11 the effects look normal. Maybe this isn't purely an HDR bug? |
Disabling the color profile applied to the monitor allows the effects to work as expected. I applied the color profile following these directions so others might also have this issue. |
further to this bug, it is also triggered with any colour profile, not just HDR. You can trigger it by reading the profile out of your monitor in Plasma 6.1 - so with 6.1 you wont need HDR hardware to fault find this |
If you want to make the effect support HDR, you can
I also hope to make KWin automatically patch shaders from javascript effects to support color management, but that's going to take at least until Plasma 6.3. |
@Zamundaaa thanks for this information! I'll see if I find an HDR screen somewhere and then I'll try to implement this. |
You don't need an HDR screen, setting an ICC profile (in 6.1, not anymore in 6.2) makes the difference very obvious too. |
I see. Can you give some insights about transparency handling? I think KWin gives source color and expects framebuffer color with premultiplied alpha. As I have to work with straight alpha (for GNOME compatibility), I have to do vec4 fragColor = texture2D(sampler, coords);
if (fragColor.a > 0.0) {
fragColor.rgb /= fragColor.a;
} in the beginning and finally fragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a); I guess |
@Zamundaaa do you have any information on this? |
Yes.
You also need to apply As you can assume the source encoding to be sRGB, you could also apply your shader code first, and then only at the end do |
@Zamundaaa Thanks! Doing both conversions at the end of the shader seems to be the best solution for now. Once GNOME supports HDR as well, I can maybe make all the shaders work in linear space. But supporting both at the same time seems hard. Since when are these methods available? Can I include Thank you! |
Plasma 6.0.
Not right now, but if that would help, we could add a |
Well, I guess it would be useful to know the KWin version in the shader sometimes. However in this case I presume that the code will sooner or later start to diverge from the Plasma 5 version anyways. So I can also start now creating two package versions, one for Plasma 5 and one for Plasma 6. |
So, I added this to the latest git clone https://github.com/Schneegans/Burn-My-Windows.git
cd Burn-My-Windows
kwin/build.sh Then the effects will be in the |
A quick test - these look mostly better - TV Glitch is being strange tho - sometimes it renders all white and sometimes black (transparent windows still render that blurred pane, but I understand that is a different issue). A secondary plasma 6 issue is that the colour selection cant be used its just a grey box that does nothing - I think the widget might have changed for plasma6? |
Ok, thanks for the feedback! I guess that these are different problems. For the color button to work, you need to install a package called |
Describe the Bug
When HDR is enabled in Plasma 6 the effects are very very dark
Steps to reproduce the behavior:
System
Please complete the following information:
The text was updated successfully, but these errors were encountered: