blob: 436520a7d24592a1eccd32d913896619202be4b8 (
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
28
29
|
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real radius: 0.25 // 0 - 1
property real distortionHeight: 0.5 // -1 - 1
property vector2d center: Qt.vector2d(0.5, 0.5)
Shader {
id: distortionVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/distortion.vert"
}
Shader {
id: distortionFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/distortionsphere.frag"
}
passes: [
Pass {
shaders: [ distortionVert, distortionFrag ]
}
]
}
|