I have a canvas based texture with transparent background that I'm alpha-blending with the diffuse color of my material. This is done using the follow custom vertex-shader code based on this SO answer:
vec4 texelColor = texture2D( map, vUv );
gl_FragColor.rgb = mix(gl_FragColor.rgb, texelColor.rgb, texelColor.a);
vec3 surfDiffuse = mix(diffuse, vec3(1,1,1), texelColor.a);
I have played around with the premultiplyAlpha setting on the texture. This is what i get:
What can i do to get rid of the dark edges around my texture?