diff options
-rw-r--r-- | src/quick/scenegraph/qsgdefaultglyphnode_p.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp index 419062d025..3df11532e4 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp @@ -95,7 +95,8 @@ const char *QSGTextMaskMaterialData::fragmentShader() const { "uniform sampler2D texture; \n" "uniform lowp vec4 color; \n" "void main() { \n" - " gl_FragColor = vec4(texture2D(texture, sampleCoord).rgb * color.a, 1.0); \n" + " lowp vec4 glyph = texture2D(texture, sampleCoord); \n" + " gl_FragColor = vec4(glyph.rgb * color.a, glyph.a); \n" "}"; } @@ -162,7 +163,7 @@ void QSGTextMaskMaterialData::updateState(const RenderState &state, QSGMaterial state.context()->functions()->glBlendColor(c.redF(), c.greenF(), c.blueF(), - 1.0f); + c.alphaF()); } } |