three.js - Transparency with SpriteNodeMaterial -
i started example https://threejs.org/examples/#webgl_sprites_nodes have animated sprite feature spritenodematerial.
the first thing wanted have background of sprite transparent, updated .png texture add alpha channel background remains black normalblending. tried customblending many blendsrc , blenddst factors result never expected one…
my update test customblending instead of 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 problem meshbasicmaterial in normalblending, seems because of spritenodematerial. maybe depth problem transparency ?
my code: https://jsfiddle.net/herve3d/zhxuvgwr/7/
thanks
Comments
Post a Comment