shader step 2: hex grid with gradient colors and wave animation

This commit is contained in:
Damocles 2026-04-13 10:43:44 +02:00
parent 6c33db2a0e
commit 42f861676e
2 changed files with 83 additions and 3 deletions

View file

@ -25,9 +25,31 @@ PanelWindow {
color: M.Theme.base01
}
// Step 1: minimal shader test should show solid red
ShaderEffect {
id: fx
anchors.fill: parent
fragmentShader: Quickshell.shellPath("modules/hex_wave.frag.qsb")
property real uSize: 50.0
property real uWavePhase: -200
property vector4d uResolution: Qt.vector4d(width, height, 0, 0)
property color uC0: M.Theme.base0C
property color uC1: M.Theme.base0E
property color uC2: M.Theme.base09
// Wave animation: 6s sweep + 8s pause
SequentialAnimation on uWavePhase {
loops: Animation.Infinite
running: true
NumberAnimation {
from: -200
to: fx.width + 200
duration: 6000
easing.type: Easing.InOutSine
}
PauseAnimation {
duration: 8000
}
}
}
}