Is it possible to control clipping between two objects?

I’m working on a mini-editor that reads game files and creates a GUI where users can change objects attributes, export, import, etc, etc
I thought, it would be a good idea to create a scene that users can click on vertices and info about that vertex.
I accomplished this by using THREE.Points() to mark vertices. It works great but there is the issue with clipping.

To counter this, tried scaling the points geometry, but it looked out of place.
I also tried disabling depthTest, but now the hidden point are visible.

Codes For Working Example x3d_vex.html (118.9 KB)

Have you tried using Sprites?

@ TacosLocos, just finished working on it. I’m afraid the result is the same as Points method. Setting alphaTest to false helps, but all those hidden point are visible now.

You can test the center point of the sphere against a rendered depth map. Sample at one point, if its behind, hide the entire sphere, if front show.

Would it look ok if you made the mesh partially transparent while the points are visible?

1 Like