aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/appearance/WallShader.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/appearance/WallShader.qml')
-rw-r--r--desktop/modules/appearance/WallShader.qml27
1 files changed, 27 insertions, 0 deletions
diff --git a/desktop/modules/appearance/WallShader.qml b/desktop/modules/appearance/WallShader.qml
new file mode 100644
index 0000000..19826ac
--- /dev/null
+++ b/desktop/modules/appearance/WallShader.qml
@@ -0,0 +1,27 @@
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+import QtQuick
+
+// One transition, by name, for the cover and the settings page's thumbnails.
+// Goes in the old picture's layer.effect, which fills in source. Every shader
+// draws the old picture at progress 0 and the new one at 1, and picks what it
+// needs from these properties. target must be an item with a layer: an Image
+// sampled directly gives the whole picture, not its PreserveAspectCrop crop.
+ShaderEffect {
+ property string name: "burn"
+ property var source
+ property var target
+ property real progress: 0
+ property real aspect: 1
+ property point origin: Qt.point(0.5, 0.5)
+ fragmentShader: Qt.resolvedUrl(name + ".frag.qsb")
+}