Disc enableEdgesRendering edges width not same


The border is divided into two parts with different widths

It looks like a z fighting issue.
It’s even more visible in this PG: https://playground.babylonjs.com/#MVSQWZ#512

I guess you can try to use z offset to shift the mesh a little behind : Material | Babylon.js Documentation

Did you try mesh Highlighting? would it fit your use case ? Highlighting Meshes | Babylon.js Documentation

As @Cedric said, you can set the zOffset property of the edge renderer material, or you can also disable z testing when drawing the border:

zOffset: https://playground.babylonjs.com/#MVSQWZ#513
No z-testing: https://playground.babylonjs.com/#MVSQWZ#514

However, both methods can/will lead to artifacts if there are other objects in the scene…


I change Edge width to 10.
I see it in https://playground.babylonjs.com/#MVSQWZ#513.

I did not see it in https://playground.babylonjs.com/#MVSQWZ#514.

There is no z fighting in the 2nd PG because depth testing is disabled.
I could reduce/remove the zfighting in the first scene with increase depth offset value. try with -1000 for example.