aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-06 17:44:17 +0100
committerDanilo M. <danix@danix.xyz>2026-11-06 17:44:17 +0100
commitf6d325615cb461473e96c9a61cfd877ab8a62075 (patch)
treee840c8c2e3c62a9fbacfd42f41e9b5e50e6314fc /desktop/modules
parentf14d4ac615fe3ae62d77ed828b6150665a687033 (diff)
downloadquickshell-f6d325615cb461473e96c9a61cfd877ab8a62075.tar.gz
quickshell-f6d325615cb461473e96c9a61cfd877ab8a62075.zip
wallpaper: six more transitions
Ink, shatter, ripple, melt, blinds and cross-warp. Each draws the old picture exactly at progress 0 and the new one at 1, or the cover would pop as it comes and goes: rendered under Xvfb with llvmpipe against the plain pictures, all seven differ by 0 at both ends. Ripple and cross-warp sample the new picture, the rest are transparent over it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules')
-rw-r--r--desktop/modules/appearance/blinds.frag39
-rw-r--r--desktop/modules/appearance/blinds.frag.qsbbin0 -> 2408 bytes
-rw-r--r--desktop/modules/appearance/crosswarp.frag37
-rw-r--r--desktop/modules/appearance/crosswarp.frag.qsbbin0 -> 2322 bytes
-rw-r--r--desktop/modules/appearance/ink.frag52
-rw-r--r--desktop/modules/appearance/ink.frag.qsbbin0 -> 3501 bytes
-rw-r--r--desktop/modules/appearance/melt.frag44
-rw-r--r--desktop/modules/appearance/melt.frag.qsbbin0 -> 2807 bytes
-rw-r--r--desktop/modules/appearance/ripple.frag43
-rw-r--r--desktop/modules/appearance/ripple.frag.qsbbin0 -> 2521 bytes
-rw-r--r--desktop/modules/appearance/shatter.frag66
-rw-r--r--desktop/modules/appearance/shatter.frag.qsbbin0 -> 4047 bytes
12 files changed, 281 insertions, 0 deletions
diff --git a/desktop/modules/appearance/blinds.frag b/desktop/modules/appearance/blinds.frag
new file mode 100644
index 0000000..49ee17b
--- /dev/null
+++ b/desktop/modules/appearance/blinds.frag
@@ -0,0 +1,39 @@
+// 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.
+
+// Vertical slats turning edge-on in a wave from a random column, darkening as
+// they turn, with the new wallpaper between them. Compiled with:
+// qsb --qt6 -o blinds.frag.qsb blinds.frag
+#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 progress;
+ vec2 origin;
+};
+layout(binding = 1) uniform sampler2D source;
+
+void main() {
+ const float n = 16.0;
+ float slat = floor(qt_TexCoord0.x * n);
+ float f = fract(qt_TexCoord0.x * n) - 0.5;
+
+ float wave = abs((slat + 0.5) / n - origin.x) / max(origin.x, 1.0 - origin.x);
+ float l = clamp((progress - 0.6 * min(wave, 1.0)) / 0.4, 0.0, 1.0);
+
+ float half_ = 0.5 * cos(l * 1.5708);
+ if (l >= 1.0 || abs(f) > half_) { fragColor = vec4(0.0); return; }
+
+ vec2 uv = vec2((slat + 0.5 + f * 0.5 / half_) / n, qt_TexCoord0.y);
+ fragColor = vec4(texture(source, uv).rgb * mix(1.0, 0.55, l), 1.0) * qt_Opacity;
+}
diff --git a/desktop/modules/appearance/blinds.frag.qsb b/desktop/modules/appearance/blinds.frag.qsb
new file mode 100644
index 0000000..d2a6885
--- /dev/null
+++ b/desktop/modules/appearance/blinds.frag.qsb
Binary files differ
diff --git a/desktop/modules/appearance/crosswarp.frag b/desktop/modules/appearance/crosswarp.frag
new file mode 100644
index 0000000..d7fc91a
--- /dev/null
+++ b/desktop/modules/appearance/crosswarp.frag
@@ -0,0 +1,37 @@
+// 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.
+
+// Both pictures pulled away from a random point by their own brightness,
+// flowing into each other: the old one stretches as it leaves, the new one
+// settles as it arrives. Opaque throughout. Compiled with:
+// qsb --qt6 -o crosswarp.frag.qsb crosswarp.frag
+#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 progress;
+ vec2 origin;
+};
+layout(binding = 1) uniform sampler2D source;
+layout(binding = 2) uniform sampler2D target;
+
+float luma(vec3 c) { return dot(c, vec3(0.299, 0.587, 0.114)); }
+
+void main() {
+ vec2 uv = qt_TexCoord0;
+ vec2 dir = uv - origin;
+ float x = smoothstep(0.0, 1.0, progress);
+ vec2 ua = uv + dir * luma(texture(source, uv).rgb) * x * 0.3;
+ vec2 ub = uv - dir * luma(texture(target, uv).rgb) * (1.0 - x) * 0.3;
+ fragColor = vec4(mix(texture(source, ua).rgb, texture(target, ub).rgb, x), 1.0) * qt_Opacity;
+}
diff --git a/desktop/modules/appearance/crosswarp.frag.qsb b/desktop/modules/appearance/crosswarp.frag.qsb
new file mode 100644
index 0000000..a6adfe0
--- /dev/null
+++ b/desktop/modules/appearance/crosswarp.frag.qsb
Binary files differ
diff --git a/desktop/modules/appearance/ink.frag b/desktop/modules/appearance/ink.frag
new file mode 100644
index 0000000..8a6f655
--- /dev/null
+++ b/desktop/modules/appearance/ink.frag
@@ -0,0 +1,52 @@
+// 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.
+
+// The old wallpaper dissolving like ink in water: a soft edge through noise
+// warped by more noise, the picture smearing as it goes. Compiled with:
+// qsb --qt6 -o ink.frag.qsb ink.frag
+#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 progress;
+ float aspect;
+};
+layout(binding = 1) uniform sampler2D source;
+
+float hash(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); }
+
+float noise(vec2 p) {
+ vec2 i = floor(p), f = fract(p);
+ vec2 u = f * f * (3.0 - 2.0 * f);
+ return mix(mix(hash(i), hash(i + vec2(1, 0)), u.x),
+ mix(hash(i + vec2(0, 1)), hash(i + vec2(1, 1)), u.x), u.y);
+}
+
+float fbm(vec2 p) {
+ float v = 0.0, a = 0.5;
+ for (int i = 0; i < 5; i++) { v += a * noise(p); p *= 2.03; a *= 0.5; }
+ return v;
+}
+
+void main() {
+ vec2 p = qt_TexCoord0 * vec2(aspect, 1.0);
+ vec2 warp = vec2(fbm(p * 3.0 + progress), fbm(p * 3.0 + 7.3 - progress));
+ // fbm sits around 0.2 to 0.8; stretched and clamped, so the edge below
+ // sweeps past every pixel.
+ float t = clamp((fbm(p * 2.0 + warp * 1.5) - 0.2) / 0.6, 0.0, 1.0);
+
+ const float w = 0.15;
+ float a = smoothstep(0.0, w, t - mix(-w, 1.0, progress));
+ vec2 uv = qt_TexCoord0 + (warp - 0.5) * 0.04 * (1.0 - a);
+ fragColor = vec4(texture(source, uv).rgb * a, a) * qt_Opacity;
+}
diff --git a/desktop/modules/appearance/ink.frag.qsb b/desktop/modules/appearance/ink.frag.qsb
new file mode 100644
index 0000000..9eaf100
--- /dev/null
+++ b/desktop/modules/appearance/ink.frag.qsb
Binary files differ
diff --git a/desktop/modules/appearance/melt.frag b/desktop/modules/appearance/melt.frag
new file mode 100644
index 0000000..86ef369
--- /dev/null
+++ b/desktop/modules/appearance/melt.frag
@@ -0,0 +1,44 @@
+// 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.
+
+// The old wallpaper running down the screen like wet paint, each column
+// starting late by its noise and accelerating. Compiled with:
+// qsb --qt6 -o melt.frag.qsb melt.frag
+#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 progress;
+ float aspect;
+};
+layout(binding = 1) uniform sampler2D source;
+
+float hash(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); }
+
+float noise(vec2 p) {
+ vec2 i = floor(p), f = fract(p);
+ vec2 u = f * f * (3.0 - 2.0 * f);
+ return mix(mix(hash(i), hash(i + vec2(1, 0)), u.x),
+ mix(hash(i + vec2(0, 1)), hash(i + vec2(1, 1)), u.x), u.y);
+}
+
+void main() {
+ float x = qt_TexCoord0.x * aspect;
+ float delay = 0.25 * (noise(vec2(x * 40.0, 0.0)) + noise(vec2(x * 9.0, 3.0)));
+ float l = clamp((progress - delay) / 0.5, 0.0, 1.0);
+
+ // Past 1, so the bottom row clears the screen.
+ vec2 uv = vec2(qt_TexCoord0.x, qt_TexCoord0.y - l * l * 1.02);
+ float a = smoothstep(-0.004, 0.0, uv.y);
+ fragColor = vec4(texture(source, uv).rgb * a, a) * qt_Opacity;
+}
diff --git a/desktop/modules/appearance/melt.frag.qsb b/desktop/modules/appearance/melt.frag.qsb
new file mode 100644
index 0000000..076427e
--- /dev/null
+++ b/desktop/modules/appearance/melt.frag.qsb
Binary files differ
diff --git a/desktop/modules/appearance/ripple.frag b/desktop/modules/appearance/ripple.frag
new file mode 100644
index 0000000..a610537
--- /dev/null
+++ b/desktop/modules/appearance/ripple.frag
@@ -0,0 +1,43 @@
+// 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.
+
+// A ring spreading from a random point, bending both pictures as it passes,
+// the new one behind it. Opaque throughout. Compiled with:
+// qsb --qt6 -o ripple.frag.qsb ripple.frag
+#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 progress;
+ float aspect;
+ vec2 origin;
+};
+layout(binding = 1) uniform sampler2D source;
+layout(binding = 2) uniform sampler2D target;
+
+void main() {
+ vec2 asp = vec2(aspect, 1.0);
+ vec2 v = (qt_TexCoord0 - origin) * asp;
+ float d = length(v) / length(max(origin, 1.0 - origin) * asp);
+
+ // e runs -1 to 1 across the ring. It starts wholly outside the picture
+ // and ends wholly past it, so neither end is bent.
+ const float w = 0.12;
+ float e = (d - mix(-w, 1.0 + w, progress)) / w;
+ float ring = 1.0 - smoothstep(0.0, 1.0, abs(e));
+ vec2 off = v / max(length(v), 1e-4) / asp * sin(e * 3.14159) * ring * 0.03;
+
+ vec2 uv = qt_TexCoord0 + off;
+ vec3 col = mix(texture(target, uv).rgb, texture(source, uv).rgb, smoothstep(-0.6, 0.6, e));
+ fragColor = vec4(col, 1.0) * qt_Opacity;
+}
diff --git a/desktop/modules/appearance/ripple.frag.qsb b/desktop/modules/appearance/ripple.frag.qsb
new file mode 100644
index 0000000..e963167
--- /dev/null
+++ b/desktop/modules/appearance/ripple.frag.qsb
Binary files differ
diff --git a/desktop/modules/appearance/shatter.frag b/desktop/modules/appearance/shatter.frag
new file mode 100644
index 0000000..4c9e40d
--- /dev/null
+++ b/desktop/modules/appearance/shatter.frag
@@ -0,0 +1,66 @@
+// 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.
+
+// The old wallpaper breaking into Voronoi shards that shrink, slide away from
+// where the blow landed and fade, each on its own delay. A shard only moves
+// inside the room its shrinking leaves, so a pixel needs one cell lookup to
+// find it, rather than a search of the neighbours. Compiled with:
+// qsb --qt6 -o shatter.frag.qsb shatter.frag
+#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 progress;
+ float aspect;
+ vec2 origin;
+};
+layout(binding = 1) uniform sampler2D source;
+
+vec2 hash2(vec2 p) {
+ return fract(sin(vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3)))) * 43758.5453);
+}
+
+// The nearest seed to p: its cell in xy, its position in zw.
+vec4 cell(vec2 p) {
+ vec2 i = floor(p), f = fract(p);
+ float best = 9.0;
+ vec4 r = vec4(0.0);
+ for (int y = -1; y <= 1; y++) {
+ for (int x = -1; x <= 1; x++) {
+ vec2 g = vec2(float(x), float(y));
+ vec2 s = g + hash2(i + g);
+ float d = dot(s - f, s - f);
+ if (d < best) { best = d; r = vec4(i + g, i + s); }
+ }
+ }
+ return r;
+}
+
+void main() {
+ const float n = 6.0;
+ vec2 asp = vec2(aspect, 1.0);
+ vec2 p = qt_TexCoord0 * asp * n;
+ vec4 c = cell(p);
+ vec2 seed = c.zw;
+
+ vec2 away = seed / n - origin * asp;
+ float d = clamp(length(away) / length(max(origin, 1.0 - origin) * asp), 0.0, 1.0);
+ float l = clamp((progress - 0.6 * mix(d, hash2(c.xy).x, 0.3)) / 0.4, 0.0, 1.0);
+
+ float s = 1.0 - 0.85 * l;
+ vec2 q = seed + (p - seed - normalize(away + 1e-4) * (1.0 - s) * 0.4) / s;
+ if (cell(q).xy != c.xy) { fragColor = vec4(0.0); return; }
+
+ float a = 1.0 - smoothstep(0.4, 1.0, l);
+ fragColor = vec4(texture(source, q / (asp * n)).rgb * a, a) * qt_Opacity;
+}
diff --git a/desktop/modules/appearance/shatter.frag.qsb b/desktop/modules/appearance/shatter.frag.qsb
new file mode 100644
index 0000000..bba25ac
--- /dev/null
+++ b/desktop/modules/appearance/shatter.frag.qsb
Binary files differ