this post was submitted on 02 Nov 2024
21 points (100.0% liked)
Firefox
20907 readers
8 users here now
/c/firefox
A place to discuss the news and latest developments on the open-source browser Firefox.
Rules
1. Adhere to the instance rules
2. Be kind to one another
3. Communicate in a civil manner
Reporting
If you would like to bring an issue to the moderators attention, please use the "Create Report" feature on the offending comment or post and it will be reviewed as time allows.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
If you're using picom you can just write a custom pixel shader that makes one very specific color transparent and then use css to set background-color to that value. Essentially just writing yourself a very hacky greenscreen solution
I am using Hyprland but it also supports custom shaders. I might give this a try, thanks.
So, I've Googled my way to a very simple example to test how this'd work. However, the example below basically doesn't have any effect. (Setting
pixColor[1] = 1.0;
makes everything green so the shader is loaded correctly).Since I don't know anything about shaders, before I open an issue on Hyprland, is this how you'd set the alpha of each pixel on a screen?
I suspect this might not be possible in Hyprland after all as it doesn't natively support per-window shaders. IIUC, Hyprland applies the shader after it composits so there's technically nothing behind the window I'm trying to make transparent.
Post the Hyprland config too?
Does it make the entire screen green by chance, not just the windows? If the shader applies to the whole screen, then setting alpha on it doesn't really makes sense and is probably discarded since your monitor can't display transparency. You need to make sure it applies on a per-window basis for them to be composited as transparent and show your wallpaper behind it.
Yes, turns out Hyprland doesn't support per-window shaders and applies them after rendering so can't do transparency with them.