aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/appearance/WallShader.qml
blob: 19826ac623557defe881408e8ec5b2a1547defbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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")
}