three.js transparent maps issue

前端 未结 4 1792
礼貌的吻别
礼貌的吻别 2021-01-02 13:31

I\'m creating loads of particles (80.000 to be exact) and I have set a transparent map, though, not all particles are transparent.

I\'m using a transparent PNG image

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-02 13:38

    You can set the alphaTest property of the material instead of transparency. For example,

    material.alphaTest = 0.5;
    material.transparent = false;
    

    three.js no longer sorts particles; they are rendered in the order they appear in the buffer.

    three.js r.85

提交回复
热议问题