Seeking assistance with a project involving two PointCloud objects, each representing a specific structure and texture. One of them should be clickable while the other should not. Let's refer to them as P1 and P2, respectively.
P1 is set up using a THREE.ShaderMaterial like so:
var p1Material = new THREE.ShaderMaterial({
uniforms: uniforms,
attributes: attributes,
vertexShader: document.getElementById('vertexShader').textContent,
fragmentShader: document.getElementById('fragmentShader').textContent,
transparent: true
});
On the other hand, P2 utilizes a THREE.PointCloudMaterial:
var p2Material = THREE.PointCloudMaterial({
size : SIZE,
map : THREE.ImageUtils.loadTexture("icons/myAwesomeIcon.png"),
sizeAttenuation : true,
transparent: true
});
Both resulting THREE.PointCloud objects have their sortParticles property set to true.
Encountering issues with transparency, such as shown below:
(REMOVED - SEE EDIT)
The textures in this scenario include a Sphere texture utilized in P2, contrasting with the textures in P1.
It can be observed that the textures in P2 do not exhibit proper transparency against those in P1. However, they display transparency among themselves, as depicted in the second image. Conversely, a similar situation occurs between the textures in P1. Nevertheless, within the same scene, there is a different example:
(REMOVED - SEE EDIT)
Some of the textures in P1 behave correctly, whereas the ones in P2 seem to be misbehaving.
The decision to separate the textures into different PointClouds was made for performance reasons, with the elements in P2 not requiring clickability. Notably, selection is achieved by clicking on an object and utilizing a THREE.Raycaster.
Any insights on what might be going wrong?
Thank you in advance!
EDIT: The issue appears to be related to the usage of BufferGeometry...
Below are two JSFiddle links that are identical except for the geometry used:
http://jsfiddle.net/vf6uu90t/3/
http://jsfiddle.net/2uh0q8Lr/2/
Is there something I'm overlooking?
I had to remove some previous links due to stackoverflow limitations... --'