pointCloudMaterial和depth-buffer中的透明纹理

时间:2015-08-11 10:24:00

标签: three.js textures

我使用threejs将pointCloud添加到屏幕上,并设置纹理贴图,但我发现顶点可以覆盖它背后的那个。

enter image description here

添加AdditiveBlending之后,它好多了,但仍有问题。

enter image description here

因为我有其他对象所以我无法添加depthTest:false,我该如何解决这个问题呢?

下面是代码和纹理

enter image description here

var geometryBig = new THREE.Geometry();
var meshBig = new THREE.PointCloud(geometryBig, new THREE.PointCloudMaterial({
    size: 4,
    color: 0xFFFFFF,
    transparent: true,
    blending: THREE.AdditiveBlending,
    // depthTest: false,
    transparent: true,
    sizeAttenuation: true,
    map: THREE.ImageUtils.loadTexture(
        "img/particle.png"
    ),
}));

1 个答案:

答案 0 :(得分:2)

添加到您的PointCloudMaterial:

depthWrite: false

enter image description here