Full Screen Post Shader? #684
Replies: 4 comments 4 replies
-
I can only speak as a user, but absolutely as far as I'm aware. Compiz is another compositor that offers exactly this functionality. If I'm understanding the X11 architecture right, pretty much everything is handed over to the compositor for, well, composition, and that also allows manipulation on a large scale like through a shader. The compositor has tot support it. There is the compton-default-fshader-win.glsl file which should contain the default shader that is being used, editing that one would lead to different "global" shader being applied. So what might be missing would be support to plug in a different one at runtime. |
Beta Was this translation helpful? Give feedback.
-
This is essentially what picom already does (at least in the new backend). Adding a custom shader stage when drawing the screen to #507 should not be too hard. Having said that, a screen magnifier would require tracking of mouse events and dynamically toggling that shader which might be a bit out of scope for picom. |
Beta Was this translation helpful? Give feedback.
-
I want this feature so bad for desktop color management. If we could just write a shader to run on post fullscreen, and preferrably in different passes per screen, that would allow us to solve many shortcomings the Linux Desktop has with color accuracy. I can totally look into implementing fullscreen post shaders myself, but I'm not sure how to do it in a general-purpose way. Color management is really complicated and clearly out of scope for picom, same story for other things like zoom discussed in this thread. I'm seriously considering writing my own compositor now ... |
Beta Was this translation helpful? Give feedback.
-
I made shader for fullscreen subpixel antialiasing. It's in the wiki: https://github.com/yshui/picom/wiki/Shader-Shop#fullscreen-subpixel-antialiasing In short - it does all the filtering as antialiasing usually does, while Xrandr just picks ready to use pixels while downscaling in nearest neighbor mode. There are parameters, set with
It uses kawase sampling technics for greyscale box part. Unfortunally it's unusable for both subpixel part (need channel shift before mix) and sharpness (fractional sampling can't lead to negations). About performance. When sharpness is done in one stage with other part - this leads to triple job due to need for 3 output pixels from previous stage. Must note - it's unlikely suitable for real use with integrated graphics - I get slideshow with i5 sandybridge 3.1GHz with only 1366x768 physical screen (it's most true 4k when multiplied from 1 Mpix to 9). |
Beta Was this translation helpful? Give feedback.
-
From what I've seen, I don't think it's possible, but I always wanted to be able to run a glsl shader over the entire screen, after everything has been rendered to the buffer. There are soooo many things you could do, like:
Is that something Xorg even allows? I have not been able to find anything about this, other than very surface level stuff.
I was thinking something along the lines of copying the screen backbuffer into the buffer of a borderless fullscreen window that is click-through, and applying a shader there. Maybe picom is not the solution for this, but maybe somebody has some ideas or experience with this.
If this is too far off-topic, I'm sorry for being annoying :D
Beta Was this translation helpful? Give feedback.
All reactions