Merge pull request #12247 from stari4ek/v3-outline-inner-holes

improve rendering of letter's inner shapes when outline is used
This commit is contained in:
子龙山人 2015-06-09 23:11:39 +08:00
commit a202387800
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);
}