In BabylonJS,how to resoleve depth conflict

From camera near plane to far plane,
Left is far,so mesh Z depth value is not enough,so conflict
Right is near,Z depth is enough,how to resolve depth conflict?(i use edgesRendering in mesh)

Try to increase near plane and decrease far plane as much as possible to limit problems with z-fighting.

If it’s not enough, you can use the zOffset property of the material to mitigate the artefacts.

You could also try a logarithmic depth buffer Logarithmic Depth Buffer | Babylon.js Documentation Didn’t have much luck with that myself, but probably doesn’t hurt to try. Last time i had this problem, the only thing that solved it was to get the 3d artist to move the meshes a tiny bit more apart.