Three.js / WebGL - transparent planes hiding other planes behind them

前端 未结 6 501
梦毁少年i
梦毁少年i 2020-11-27 17:18

When you have two planes in Three.js / WebGL and one or both of them are transparent, sometimes the plane behind will be hidden by the transparent plane above. Why is this?<

6条回答
  •  离开以前
    2020-11-27 17:59

    fwiw, if you have lots of parallel planes (can't see your sample, google can't resolve your domain), it's easy to keep them sorted along the perpendicular axis. For a list of planes [A B C D] the order-to-draw will be either [A B C D] or [D C B A] and nothing else! So there need not be a performance hit from sorting. Just keep them in order as you go.

提交回复
热议问题