By default, webgl treats colors as premultiplied. here the "icon" image is not premultiplied. So you have to add the line gl_FragColor.rgb *= gl_FragColor.a if we don't, here is the result, note the white limit at the intersections of the icons
if we add this line, we see a better result :
void main() { gl_FragColor = texture2D(spriteTexture, gl_PointCoord); gl_FragColor.rgb *= gl_FragColor.a; }
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
By default, webgl treats colors as premultiplied.

here the "icon" image is not premultiplied. So you have to add the line
gl_FragColor.rgb *= gl_FragColor.a
if we don't, here is the result, note the white limit at the intersections of the icons
if we add this line, we see a better result :
void main() {
gl_FragColor = texture2D(spriteTexture, gl_PointCoord);
gl_FragColor.rgb *= gl_FragColor.a;
}