I am struggling with having sprites render correctly when in front of a PlaneBufferGeometry with a MeshBasicMaterial applied to it. Sprites are loaded from PNGs with transparent backgrounds, however, this background flickers to black when in front of the plane. It seems it happens only when using PerspectiveCamera, not OrthographicCamera.
This screenshot illustrates the problem.
Hope someone recognizes this problem, I have been struggling too long with this now
Can you please try to set
depthWrite of your sprite material to
That sort of works; the problem with the sprite background showing up is not there anymore, but now the sprite itself disappears… When moving the camera (using OrbitControls) sprites come and go now…
Let’s try something different. Please undo the change to
depthWrite and set
false. Then set the
alphaTest property to e.g.
0.5. Does this improve the rendering?
Yes that works! Brilliant, thank you very much, Mugen, it displays fine now.