aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders_ng/distancefieldtext.vert
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/shaders_ng/distancefieldtext.vert')
-rw-r--r--src/quick/scenegraph/shaders_ng/distancefieldtext.vert16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/quick/scenegraph/shaders_ng/distancefieldtext.vert b/src/quick/scenegraph/shaders_ng/distancefieldtext.vert
index d56ddddd24..eeb9f7bcce 100644
--- a/src/quick/scenegraph/shaders_ng/distancefieldtext.vert
+++ b/src/quick/scenegraph/shaders_ng/distancefieldtext.vert
@@ -6,17 +6,23 @@ layout(location = 1) in vec2 tCoord;
layout(location = 0) out vec2 sampleCoord;
layout(std140, binding = 0) uniform buf {
+#if QSHADER_VIEW_COUNT >= 2
+ mat4 matrix[QSHADER_VIEW_COUNT];
+#else
mat4 matrix;
+#endif
vec2 textureScale;
vec4 color;
float alphaMin;
float alphaMax;
-} ubuf;
-
-out gl_PerVertex { vec4 gl_Position; };
+};
void main()
{
- sampleCoord = tCoord * ubuf.textureScale;
- gl_Position = ubuf.matrix * vCoord;
+ sampleCoord = tCoord * textureScale;
+#if QSHADER_VIEW_COUNT >= 2
+ gl_Position = matrix[gl_ViewIndex] * vCoord;
+#else
+ gl_Position = matrix * vCoord;
+#endif
}