diff options
author | Eli Fidler <efidler@topologyinc.com> | 2015-06-19 16:44:29 -0400 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2015-06-23 14:57:35 +0000 |
commit | 3e5a89ae70eb612afef0d593f180a57da17c782f (patch) | |
tree | d7eeea56893329590b455fb4b57645859525873f /src/quick/scenegraph/shaders | |
parent | 9dee99ece7a10fa7a9b723b0d733c3d99b6cf57f (diff) |
Support 32-bit color bitmap glyphs in native text rendering.
We had been accidentally using the 8-bit alpha glyph shader, which
resulted in rendering solid black outlines of the glyphs.
Task-number: QTBUG-37986
Task-number: QTBUG-45514
Change-Id: Ie8728d50068f58d659e24bc5db2d73e01ca8db75
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/quick/scenegraph/shaders')
-rw-r--r-- | src/quick/scenegraph/shaders/32bitcolortext.frag | 9 | ||||
-rw-r--r-- | src/quick/scenegraph/shaders/32bitcolortext_core.frag | 13 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/quick/scenegraph/shaders/32bitcolortext.frag b/src/quick/scenegraph/shaders/32bitcolortext.frag new file mode 100644 index 0000000000..6fdb6e6aeb --- /dev/null +++ b/src/quick/scenegraph/shaders/32bitcolortext.frag @@ -0,0 +1,9 @@ +varying highp vec2 sampleCoord; + +uniform sampler2D _qt_texture; +uniform lowp float color; // just the alpha, really... + +void main() +{ + gl_FragColor = texture2D(_qt_texture, sampleCoord) * color; +} diff --git a/src/quick/scenegraph/shaders/32bitcolortext_core.frag b/src/quick/scenegraph/shaders/32bitcolortext_core.frag new file mode 100644 index 0000000000..010aca97b4 --- /dev/null +++ b/src/quick/scenegraph/shaders/32bitcolortext_core.frag @@ -0,0 +1,13 @@ +#version 150 core + +in vec2 sampleCoord; + +out vec4 fragColor; + +uniform sampler2D _qt_texture; +uniform float color; // just the alpha, really... + +void main() +{ + fragColor = texture(_qt_texture, sampleCoord) * color; +} |