projects
/
profile
/
ivi
/
qtdeclarative.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
ccd515652a1b64274b11a7111d81851e9cf1a53b
[profile/ivi/qtdeclarative.git]
/
tests
/
auto
/
qtquick2
/
qquickitemlayer
/
data
/
TextureProvider.qml
1
import QtQuick 2.0
2
3
Item
4
{
5
width: 100
6
height: 100
7
8
Rectangle {
9
id: box
10
width: 100
11
height: 100
12
13
color: "#0000ff"
14
15
Rectangle {
16
x: 50
17
width: 50
18
height: 100
19
color: "#00ff00"
20
}
21
22
visible: false
23
24
layer.enabled: true
25
}
26
27
ShaderEffect {
28
anchors.fill: parent
29
property variant source: box
30
31
fragmentShader: "
32
uniform lowp sampler2D source;
33
uniform lowp float qt_Opacity;
34
varying highp vec2 qt_TexCoord0;
35
void main() {
36
gl_FragColor = texture2D(source, qt_TexCoord0).bgra * qt_Opacity;
37
}"
38
}
39
40
}