WebGL alpha 与深度混合

WebGL alpha blending with depth

如何在 WebGL 中正确混合两个半不透明的面,如图所示?

正常方法是你必须将这 2 张脸分成 4 张脸,按深度排序,并从远到近绘制它们。

还有另一种技术,depth peeling但它也相当复杂。

还有order independent transparency.

最后这两种技术可能更适合 WebGL2