// packages/dev/core/src/Rendering/renderingGroup.ts
public static PainterSortCompare(a: SubMesh, b: SubMesh): number {
const meshA = a.getMesh();
const meshB = b.getMesh();
if (meshA.material && meshB.material) {
return meshA.material.uniqueId - meshB.material.uniqueId;
}
return meshA.uniqueId - meshB.uniqueId;
}
I wonder why the list is sorted by material and geometry before rendering?