How does needDepthPrePass work? Is it possible to pass my own render order values for instances?

Mesh sorting does not work for instanced meshes, because they are treated differently from other meshes (you can see that your PG is working if you replace createInstance with clone).

You can set the Mesh.INSTANCEDMESH_SORT_TRANSPARENT flag to true if you want to sort transparent instanced meshes, but you don’t have a choice of metric; they will be sorted by distance from the camera.

2 Likes