Scaling InstancedMesh extra draw call bug?

So I’ve noticed that if I scale negatively an instancedmesh. It creates a new draw call?
But if I scale positive, it doesn’t create a new draw call… only when negative.
I need to scale -1, to mirror an instancedMesh.

https://playground.babylonjs.com/#U5BPTH#1

Instances | Babylon.js Documentation See limitations section. It works as expected.

1 Like

This part: “Instances with a world matrix where determinant is different than root mesh world matrix will be rendered separately (like a regular mesh). This mostly happens when the sign of the scaling vector is different between an instance and the root mesh.”

Oh… ok, didn’t know that.

Any ideas of how can we get a mirrored instanced mesh other than scaling -1 ?

Thanks for the explanation.

create 2 list of instances :slight_smile: one with negative scale and one with positive. You ll end up having 2 draw calls only.

3 Likes