aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders_ng/texture.vert
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/shaders_ng/texture.vert')
-rw-r--r--src/quick/scenegraph/shaders_ng/texture.vert14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/quick/scenegraph/shaders_ng/texture.vert b/src/quick/scenegraph/shaders_ng/texture.vert
index 537852d2bd..ae8a27f4a6 100644
--- a/src/quick/scenegraph/shaders_ng/texture.vert
+++ b/src/quick/scenegraph/shaders_ng/texture.vert
@@ -6,14 +6,20 @@ layout(location = 1) in vec2 qt_VertexTexCoord;
layout(location = 0) out vec2 qt_TexCoord;
layout(std140, binding = 0) uniform buf {
+#if QSHADER_VIEW_COUNT >= 2
+ mat4 qt_Matrix[QSHADER_VIEW_COUNT];
+#else
mat4 qt_Matrix;
+#endif
float opacity;
-} ubuf;
-
-out gl_PerVertex { vec4 gl_Position; };
+};
void main()
{
qt_TexCoord = qt_VertexTexCoord;
- gl_Position = ubuf.qt_Matrix * qt_VertexPosition;
+#if QSHADER_VIEW_COUNT >= 2
+ gl_Position = qt_Matrix[gl_ViewIndex] * qt_VertexPosition;
+#else
+ gl_Position = qt_Matrix * qt_VertexPosition;
+#endif
}