Keeping edges on "top" of object mesh

I would like to have the edges maintain uniform visibility even if they are at the back of their parent mesh. Notice how the upper lid of the cylinder is more prominent at the front, and get’s faint at the rear. Without the cylinder mesh, the edge looks just fine.

Screenshot from 2024-02-04 18-24-20

Is there a way to do this?

you can make the lines transparent even if they have opacity 1, if the models are opaque then three will render the two in two batches. then there’s renderOrder, which allows you to put one thing in front of the other (watch out for transparent and opaque batches, each batch has their own order). and there’s also polygonOffset on the material.


@drcmda thanks for the suggestions. renderOrder seems to affect visibility, but unfortunately it only diminishes it. I added a depthTest on the material for the meshes and set it as false for the lines, and I am getting the kind of nice and smooth rendering I am expecting for the lines, but obviously that also shows the lines behind the meshes.

Peek 2024-02-12 19-00

Would there be any way to override or customize this depth testing?