aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/twotextureproviders/shaders/xorblender_rhi.vert
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-10-08 15:13:33 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-10-14 13:56:31 +0200
commit5fcd32c86413df81b36be6fed162d3da5c7556e2 (patch)
treed32604f78546bbc755146649ecdaa9b5a09c1b0d /examples/quick/scenegraph/twotextureproviders/shaders/xorblender_rhi.vert
parent67ef2583e481a37d51cb9d5d4d6046069559a754 (diff)
Make twotextureproviders work on the rhi rendering path
Involves porting away from the ill-fated QSGSimpleMaterial. This marks the first appearance of QSGMaterialRhiShader in any of the examples. Task-number: QTBUG-79086 Change-Id: I464e2bd06a6b5b19775b1b35265bb843979ec4b4 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'examples/quick/scenegraph/twotextureproviders/shaders/xorblender_rhi.vert')
-rw-r--r--examples/quick/scenegraph/twotextureproviders/shaders/xorblender_rhi.vert19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/quick/scenegraph/twotextureproviders/shaders/xorblender_rhi.vert b/examples/quick/scenegraph/twotextureproviders/shaders/xorblender_rhi.vert
new file mode 100644
index 0000000000..41000bde04
--- /dev/null
+++ b/examples/quick/scenegraph/twotextureproviders/shaders/xorblender_rhi.vert
@@ -0,0 +1,19 @@
+#version 440
+
+layout(location = 0) in vec4 aVertex;
+layout(location = 1) in vec2 aTexCoord;
+
+layout(location = 0) out vec2 vTexCoord;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 qt_Matrix;
+ float qt_Opacity;
+} ubuf;
+
+out gl_PerVertex { vec4 gl_Position; };
+
+void main()
+{
+ gl_Position = ubuf.qt_Matrix * aVertex;
+ vTexCoord = aTexCoord;
+}