From: Victor Cebollada Date: Mon, 23 Jan 2017 08:54:50 +0000 (+0000) Subject: [3.0] Text - Use the uColor uniform to render the emojis. X-Git-Tag: accepted/tizen/3.0/common/20170125.121942^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F62%2F111662%2F1;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [3.0] Text - Use the uColor uniform to render the emojis. * Allows to mix the emoji color with a given color. i.e. a different alpha. Change-Id: If8b3a4eecf2dc65785afd3aafbe03c485ac0d444 Signed-off-by: Victor Cebollada --- diff --git a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp index 8532b93..12d39a5 100644 --- a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp +++ b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp @@ -1,4 +1,4 @@ - /* +/* * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -61,12 +61,13 @@ void main() ); const char* FRAGMENT_SHADER_RGBA = MAKE_SHADER( +uniform lowp vec4 uColor; uniform sampler2D sTexture; varying mediump vec2 vTexCoord; void main() { - gl_FragColor = texture2D( sTexture, vTexCoord ); + gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor; } );