aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/shaders_ng/outlinedtext.frag
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/shaders_ng/outlinedtext.frag')
-rw-r--r--src/quick/scenegraph/shaders_ng/outlinedtext.frag13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/quick/scenegraph/shaders_ng/outlinedtext.frag b/src/quick/scenegraph/shaders_ng/outlinedtext.frag
index e2f82d3845..5c81f26272 100644
--- a/src/quick/scenegraph/shaders_ng/outlinedtext.frag
+++ b/src/quick/scenegraph/shaders_ng/outlinedtext.frag
@@ -1,3 +1,6 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
#version 440
layout(location = 0) in vec2 sampleCoord;
@@ -12,14 +15,18 @@ layout(binding = 1) uniform sampler2D _qt_texture;
layout(std140, binding = 0) uniform buf {
mat4 modelViewMatrix;
+#if QSHADER_VIEW_COUNT >= 2
+ mat4 projectionMatrix[QSHADER_VIEW_COUNT];
+#else
mat4 projectionMatrix;
- vec4 color;
+#endif
vec2 textureScale;
float dpr;
+ vec4 color;
// the above must stay compatible with textmask/8bittextmask
vec4 styleColor;
vec2 shift;
-} ubuf;
+};
void main()
{
@@ -30,5 +37,5 @@ void main()
texture(_qt_texture, sCoordRight).r,
0.0, 1.0) - glyph,
0.0, 1.0);
- fragColor = outline * ubuf.styleColor + step(1.0 - glyph, 1.0) * glyph * ubuf.color;
+ fragColor = outline * styleColor + step(1.0 - glyph, 1.0) * glyph * color;
}