aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitemlayer/data/SamplerNameChange.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickitemlayer/data/SamplerNameChange.qml')
-rw-r--r--tests/auto/quick/qquickitemlayer/data/SamplerNameChange.qml18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickitemlayer/data/SamplerNameChange.qml b/tests/auto/quick/qquickitemlayer/data/SamplerNameChange.qml
new file mode 100644
index 0000000000..a4c2ebff6b
--- /dev/null
+++ b/tests/auto/quick/qquickitemlayer/data/SamplerNameChange.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 200
+ height: 200
+ color: "blue"
+ layer.enabled: true
+ layer.effect: ShaderEffect {
+ fragmentShader: "
+ uniform sampler2D foo;
+ uniform lowp float qt_Opacity;
+ varying highp vec2 qt_TexCoord0;
+ void main() {
+ gl_FragColor = texture2D(foo, qt_TexCoord0) * qt_Opacity;
+ }"
+ }
+ Component.onCompleted: layer.samplerName = "foo"
+}