我使用three.js中的精灵来加载纹理点(以前pointcloud),我无法让混合正常工作。这里是我使用的代码:如何让three.js雪碧背景融合?
this._renderer = new THREE.WebGLRenderer({alpha: true, antialias: true, preserveDrawingBuffer: true});
this._renderer.setClearColor(0x000000, 0);
....
new THREE.Points(geometry, new THREE.PointsMaterial({transparent: true, blending: THREE.CustomBlending, blendSrc: THREE.OneFactor, blendEquation: THREE.AddEquation, map: lt._sprite, size: 1, vertexColors: true}));
精灵包含三个js附带的disc.png精灵。这是它的外观:
- 自定义混合(代码如上):threejsblending。
- 没有共混:no blending
不同blendings我用看起来是相同的上述和/或子画面中的一个未加载正确(正方形点)。
我对threejs或webgl不是很熟悉。任何帮助表示赞赏。整个代码很长很复杂,但我可以发布任何相关的部分。
谢谢。 背景确实是透明的。我使用three.js本身的纹理,它显然适用于某些要点,而不适用于其他要点。 昨晚我终于明白了。它与alphaTest有关。 – amfractal