Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Applying GLSL shader/graphical effects to Window elements?
katanaswordfish last edited by
I've been testing GUI possibilities using QtQuick and QML, but I've been having trouble finding information on applying GLSL shader effects to the Window itself. For example, let's say I want to make a fullscreen application that simply blurs everything behind the window; as you move the application window around your desktop, everything behind the window would be affected by the shaders, and if you maximize the app the entire screen would be affected. Applying a shader or blur effect in this way would allow me to make a nice translucency effect instead of basic transparency.
In the official documentation, they mention applying a shader effect to an Image element. In order to do so, they connect it to the Image using the id. I've tried referring to the 'id' property of my 'Window' QML element, but it doesn't work (results in a black window as the shader fails to process correctly). There is also the QtGraphicalEffects module, which has some very nice effects built into it, but I haven't had much luck with applying those effects to the window either. Also, I've explored the possibility of writing the Window to a texture using ShaderEffectSource, but that doesn't seem to work either..
So, with QtQuick2.2 and QML, is there anyway to 'capture' the pixels behind the window and process them using a GLSL shader and/or QML Graphical Effects property? Or, if they're already available through the Window class, how can I access them?