diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2015-12-13 16:57:03 +0000 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-12-15 05:09:14 +0000 |
commit | e3c3710b01a100b1f662e02302803b50cc7a27f6 (patch) | |
tree | 187a7845916b84f60493e0378b308f4504a436f5 /src/quick | |
parent | 85b64e701b2eaecdd30a7e0e079e2c80dd846fec (diff) |
Fix styled text core profile shader
Without this all styled text appears as solid-filled rectangles.
Change-Id: I7b64b274b3562b75ed7126d4bb8e89b6cb8d6f77
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/scenegraph/shaders/styledtext_core.frag | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/scenegraph/shaders/styledtext_core.frag b/src/quick/scenegraph/shaders/styledtext_core.frag index 50f64c64a2..5480e95a42 100644 --- a/src/quick/scenegraph/shaders/styledtext_core.frag +++ b/src/quick/scenegraph/shaders/styledtext_core.frag @@ -3,7 +3,7 @@ in vec2 sampleCoord; in vec2 shiftedSampleCoord; -out vec4 color; +out vec4 fragColor; uniform sampler2D _qt_texture; uniform vec4 color; @@ -11,8 +11,8 @@ uniform vec4 styleColor; void main() { - float glyph = texture(_qt_texture, sampleCoord).a; + float glyph = texture(_qt_texture, sampleCoord).r; float style = clamp(texture(_qt_texture, shiftedSampleCoord).r - glyph, 0.0, 1.0); fragColor = style * styleColor + glyph * color; -}
\ No newline at end of file +} |