It is a common request and I think it can be useful. The problem with beryl blur is that it is way too slow. I haven't poured through all of their code but I strongly suspect that there is some intensive code to work out where to blur. I would be happy with just a basic blur under transparent windows. Is there anything that can be done in the core to make effects underneath transparent windows easier? The other problem with the blur was that 100% transparent parts of the window were blurred so corners of the windows had strange looking blurring. There is a basic blur plugin here, all my attempts to get it working have failed so I would welcome any tips. Could the core be changed to support these blur functions? http://forum.go-compiz.org/viewtopic.php?t=207
Mike Dransfield escreveu:> It is a common request and I think it can > be useful. The problem with beryl blur is > that it is way too slow. >Really? It is very fast here on my old fx 5200. So fast I left it enabled on transformed windows and can drag windows around with wobble and notice no lag. Maybe you forgot to play with the options and tweak it so it is fast there? The cache option seems to make a lot of difference, as well as choosing a small (2x2 or 3x3) blur area. Does your card support pixel shaders? If it doesn't, I remember someone doing it on fixed pipeline, but don't have it here so I don't know if it has been integrated into the current plugin or not. Solerman
> There is a basic blur plugin here, all my attempts > to get it working have failed so I would welcome > any tips. Could the core be changed to support > these blur functions? > > http://forum.go-compiz.org/viewtopic.php?t=207The forum seems to be currently down but I guess this is "our" thread ;) I see two kind of answers : - Pixel shaders (if available) are probably the best solution : they're fast and they should not be too difficult to apply behind a window. Look at water plugin maybe. - If you want to make blur without shaders, this will probalby be much more tricky. Like we noticed, convolution filters do not seem to be available on all cards (they were on my gf4 but not on my ati). Plus, this is not accelerated by the card. Even more, to blur behind a window you will probably need to redraw what was behind :( A trick that is used by the blurfx plugin in beryl (if I remember correctly) is to scale down the texture behind the window, and then scale it back to size before blending with the window. This works but creates ugly artifacts as soon as the zoom factor is more than 2 :( Another trick than would probably be 1/ much more good looking and 2/ less cpu-intensive than convolution (or at least as cpu-intensive) would be to blend several (let say 9) textures of what is behind the window, each one with a very low alpha, but each one with an offset of one pixel in each direction : __________________ |_|_|_|______|_|_|_| |_|_|_|______|_|_|_| |_|_|_|______|_|_|_| | | | | | | | | | | | | | | | | | | | | | | | | |_|_|_|______|_|_|_| |_|_|_|______|_|_|_| |_|_|_|______|_|_|_| |_|_|_|______|_|_|_| Hmmm I'm not sure my english and my ascii art skills are enough to make myself clear, but anyway, here it is ;) Would it be possible ? I wish I had more time to help and code :( Oh, and happy new year everybody ;) Best regards, -- Julien
On Wed, 2007-01-03 at 02:47 +0000, Mike Dransfield wrote:> It is a common request and I think it can > be useful. The problem with beryl blur is > that it is way too slow. > > I haven't poured through all of their code > but I strongly suspect that there is some > intensive code to work out where to blur. > > I would be happy with just a basic blur under > transparent windows. > > Is there anything that can be done in the core > to make effects underneath transparent windows > easier? The other problem with the blur was > that 100% transparent parts of the window were > blurred so corners of the windows had strange > looking blurring. > > There is a basic blur plugin here, all my attempts > to get it working have failed so I would welcome > any tips. Could the core be changed to support > these blur functions? > > http://forum.go-compiz.org/viewtopic.php?t=207 >I will be adding a blur plugin to the main compiz repository at some point. That's a promise. I did have a quick look at an existing blur plugin some time ago but it contained a lot of code and many alternative code paths for something that I like to have a simple and easy to maintain solution for. I'll implement my own blur plugin from scratch soon unless someone presents a simple straight forward plugin that can do the job. I pretty sure no changes to the core should be needed to implement a simple, efficient blur plugin. However, I don't like to add another programmable fragment processing plugin before we have proper way to make these type of plugins work together. So to make the blur plugin work at the same time as the water plugin and any other plugin that's modifying the fragment processing stage, changes to the core are needed. I'll try to get and initial version of this fragment processing interface done soon. Once it's done, implementing a blur plugin shouldn't take too long. -David