diff options
Diffstat (limited to 'src/quick/scenegraph/shaders_ng/outlinedtext_a.frag')
-rw-r--r-- | src/quick/scenegraph/shaders_ng/outlinedtext_a.frag | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag b/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag index 5b7bd9ca82..c4db8b54f0 100644 --- a/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag +++ b/src/quick/scenegraph/shaders_ng/outlinedtext_a.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; @@ -11,14 +14,19 @@ layout(location = 0) out vec4 fragColor; layout(binding = 1) uniform sampler2D _qt_texture; layout(std140, binding = 0) uniform buf { - // must match styledtext - mat4 matrix; - vec4 color; + mat4 modelViewMatrix; +#if QSHADER_VIEW_COUNT >= 2 + mat4 projectionMatrix[QSHADER_VIEW_COUNT]; +#else + mat4 projectionMatrix; +#endif vec2 textureScale; float dpr; + vec4 color; + // the above must stay compatible with textmask/8bittextmask vec4 styleColor; vec2 shift; -} ubuf; +}; void main() { @@ -29,5 +37,5 @@ void main() texture(_qt_texture, sCoordRight).a, 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; } |