How transparency of Points object works?

Yeah, I had no idea that for some reason, geometry is made out of many matching vertices.

You can use the mergeVertices function in BufferGeometryUtils to dedupe verts, as well, and get a position buffer of unique vertices. You’ll have to remove the index buffer, though.

I know vertices should be rendered from back to front, I think saw something in the library code related to sorting opaque objects, not sure if it applies to individual vertices though.

Three.js (and most rendering libraries) will sort transparent objects from back to front for rendering but there’s nothing performant that can be done to sort points that are within a single geometry that is being rendered.

If the library takes care of rendering opaque objects first and then transparent second, I’d like to implement order independent blending of points as described here:

Cesium supports weighted blended transparency but just note that the result is not “correct” – it will avoid some other render order inconsistencies. It’s more of a trade off depending on what you want. There are a lot of different ways to render transparent objects with different trade offs. I posted a list of some of them here if you’re interested in other options.

1 Like