fix black border around icon

This commit is contained in:
Konstantin Käfer
2014-08-06 14:34:34 +02:00
parent b281313266
commit 3043b5608f

View File

@@ -4,7 +4,7 @@ varying vec2 v_tex;
varying float v_alpha;
void main() {
gl_FragColor = texture2D(u_texture, v_tex);
gl_FragColor.a *= v_alpha;
gl_FragColor.rgb *= gl_FragColor.a;
// Note: We don't need to premultiply here as the image we use is already
// premultiplied in the sprite atlas.
gl_FragColor = texture2D(u_texture, v_tex) * v_alpha;
}