I was about to open an issue on GitHub about this, but thought I’d ask here first.
We have a relatively complex scene of 300+ meshes with a highlight layer that only has 2 meshes which are added with .addMesh(). However, when I dig into the rendering for that layer, I see it takes a long time (+4ms). I spent some time looking at the internal mesh lists and saw all the other meshes are there (opaqueSubMeshes, alphaTestSubMeshes etc). When I add these other meshes to the excludeMesh list of the Highlight layer, the performance improves.
Is this expected behaviour?
Here is a PG example:
https://playground.babylonjs.com/#CG4CW0#9