-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMyEffect.qml
28 lines (27 loc) · 876 Bytes
/
MyEffect.qml
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
import QtGraphicalEffects 1.15
import QtQuick 2.15
ShaderEffect {
id: that
required property var myItem
z: myItem.ObjectModel.index
property var prev//: {output: 0}//: visualModel.get(myItem.ObjectModel.index-1).img
property var texSize: prev.output.texSize
property var output: visible ? that : prev.output
layer.textureSize: texSize
layer.enabled: true
layer.smooth: true
visible: myItem.enableEffect
anchors.centerIn: parent
width: window.effectWidth
height: window.effectHeight
property variant src: prev.output
vertexShader: "
uniform highp mat4 qt_Matrix;
attribute highp vec4 qt_Vertex;
attribute highp vec2 qt_MultiTexCoord0;
varying highp vec2 coord;
void main() {
coord = qt_MultiTexCoord0;
gl_Position = qt_Matrix * qt_Vertex;
}"
}