Hey I’m integrating selection outliner in Babylon.js Editor and I noticed a small bug.
When creating an instance of a mesh which contains LODs, the outline disappears when the first LOD level awakes. This behavior is the same when outline is applied on source mesh or the instance ifself. If you remove the instance, you’ll see that everything works fine
This turned out to be a bug in SelectionOutlineLayer._renderSubMesh. When LOD switches to a different mesh, two things went wrong:
The LOD mesh inherited world-matrix instance buffers from the scene render, which incorrectly forced it into the hardware instanced rendering path — but without the selection ID attribute, so
the outline data was lost.
The selection ID lookup never checked the master (source) mesh when rendering a LOD mesh.