I started from the example https://threejs.org/examples/#webgl_sprites_nodes to have the animated sprite feature thanks to the SpriteNodeMaterial.
The first thing I wanted was to have the background of the sprite transparent, I updated the .PNG texture to add an alpha channel but the background remains black with NormalBlending. I tried with CustomBlending with many blendSrc and blendDst factors but the result is never the expected one…
My update to test CustomBlending instead of the default NormalBlending:
walkingManTexture.premultiplyAlpha = true;
sprite1.material.transparent = true;
//sprite1.material.alphaTest = 0.5;
sprite1.material.blending = THREE[ "CustomBlending" ];
sprite1.material.blendSrc = THREE[ "OneFactor" ];
sprite1.material.blendDst = THREE[ "OneMinusSrcAlphaFactor" ];
sprite1.material.blendEquation = THREE.AddEquation;
I don’t have the problem with a MeshBasicMaterial in NormalBlending, seems to be because of SpriteNodeMaterial. Maybe a depth problem only with transparency ?
My code: https://jsfiddle.net/herve3d/zhxuvgwr/7/
Thanks