diff --git a/assets/shaders/fade.frag b/assets/shaders/fade.frag deleted file mode 100644 index a6cdf70d..00000000 --- a/assets/shaders/fade.frag +++ /dev/null @@ -1,26 +0,0 @@ -#version 440 - -layout(location = 0) in vec2 qt_TexCoord0; -layout(location = 0) out vec4 fragColor; - -layout(std140, binding = 0) uniform buf { - mat4 qt_Matrix; - float qt_Opacity; - float fadeMargin; -}; - -layout(binding = 1) uniform sampler2D source; - -void main() { - vec4 tex = texture(source, qt_TexCoord0); - float factor = 1.0; - float margin = 0.1; - - if (qt_TexCoord0.y < margin) { - factor = qt_TexCoord0.y / margin; - } else if (qt_TexCoord0.y > (1.0 - margin)) { - factor = (1.0 - qt_TexCoord0.y) / margin; - } - - fragColor = tex * factor * qt_Opacity; -} diff --git a/assets/shaders/fade.frag.qsb b/assets/shaders/fade.frag.qsb deleted file mode 100644 index 888e4c10..00000000 Binary files a/assets/shaders/fade.frag.qsb and /dev/null differ diff --git a/assets/shaders/opacitymask.frag b/assets/shaders/opacitymask.frag deleted file mode 100644 index 94a80b8a..00000000 --- a/assets/shaders/opacitymask.frag +++ /dev/null @@ -1,19 +0,0 @@ -#version 440 - -layout(location = 0) in vec2 qt_TexCoord0; -layout(location = 0) out vec4 fragColor; - -layout(std140, binding = 0) uniform buf { - // qt_Matrix and qt_Opacity must always be both present - // if the built-in vertex shader is used. - mat4 qt_Matrix; - float qt_Opacity; -}; - -layout(binding = 1) uniform sampler2D source; -layout(binding = 2) uniform sampler2D maskSource; - -void main() -{ - fragColor = texture(source, qt_TexCoord0.st) * (texture(maskSource, qt_TexCoord0.st).a) * qt_Opacity; -} diff --git a/assets/shaders/opacitymask.frag.qsb b/assets/shaders/opacitymask.frag.qsb deleted file mode 100644 index 7bf97c28..00000000 Binary files a/assets/shaders/opacitymask.frag.qsb and /dev/null differ diff --git a/components/effects/OpacityMask.qml b/components/effects/OpacityMask.qml deleted file mode 100644 index 8e625034..00000000 --- a/components/effects/OpacityMask.qml +++ /dev/null @@ -1,9 +0,0 @@ -import QtQuick -import Quickshell - -ShaderEffect { - required property Item source - required property Item maskSource - - fragmentShader: Quickshell.shellPath("assets/shaders/opacitymask.frag.qsb") -} diff --git a/modules/bar/components/workspaces/SpecialWorkspaces.qml b/modules/bar/components/workspaces/SpecialWorkspaces.qml index fb34d842..70476df8 100644 --- a/modules/bar/components/workspaces/SpecialWorkspaces.qml +++ b/modules/bar/components/workspaces/SpecialWorkspaces.qml @@ -18,7 +18,7 @@ Item { readonly property string activeSpecial: (GlobalConfig.bar.workspaces.perMonitorWorkspaces ? monitor : Hypr.focusedMonitor)?.lastIpcObject.specialWorkspace?.name ?? "" layer.enabled: true - layer.effect: OpacityMask { + layer.effect: Mask { maskSource: mask } diff --git a/modules/lock/Media.qml b/modules/lock/Media.qml index ea8c3073..84a06c9f 100644 --- a/modules/lock/Media.qml +++ b/modules/lock/Media.qml @@ -31,7 +31,7 @@ Item { } layer.enabled: true - layer.effect: OpacityMask { + layer.effect: Mask { maskSource: mask } diff --git a/modules/sidebar/NotifActionList.qml b/modules/sidebar/NotifActionList.qml index 674a15a9..ed787b66 100644 --- a/modules/sidebar/NotifActionList.qml +++ b/modules/sidebar/NotifActionList.qml @@ -20,7 +20,7 @@ Item { layer.enabled: true layer.smooth: true - layer.effect: OpacityMask { + layer.effect: Mask { maskSource: gradientMask }