improve rendering of inner shapes when outline is used

This commit is contained in:
Michael Sotnikov 2015-06-08 12:56:43 +03:00
parent a364d6ecfc
commit dae8f788c1
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ void main()
vec4 sample = texture2D(CC_Texture0, v_texCoord);
float fontAlpha = sample.a;
float outlineAlpha = sample.r;
if (outlineAlpha > 0.0){
if ((fontAlpha + outlineAlpha) > 0.0){
vec4 color = u_textColor * fontAlpha + u_effectColor * (1.0 - fontAlpha);
gl_FragColor = v_fragmentColor * vec4( color.rgb,max(fontAlpha,outlineAlpha)*color.a);
}