How to Render a Mesh Always, Ignoring Z-Distance

I’m trying to figure out how to always render a mesh’s triangles fully, even if it’s partially or completely behind another mesh. Thus, even as it moves further away behind other objects you’d only see it get smaller but still be drawn “in front of” them, with no occlusion culling or Z distance taken into consideration.

Applications might be, for example, to elminate z-fighting of meshes that line the contours of the terrain, or for a line renderer that’s right on the surface of a mesh which becomes half-buried depending on the camera angle. You just want things like this to be drawn fully and not chopped off by any meshes they happen to intersect with.

Is this something that can only be done with a shader? I tried setting “ZWrite off” and “ZTest Always”, but triangles still get chopped off by intersecting meshes regardless, thus I’m not sure what those commands actually accomplish. Tried also setting “Queue” to “Overlay” to no avail.

I would tackle this with two cameras. Put your unhiddable object on a layer only rendered by the second camera. Then set the second camera up to render everything on top of the first camera.

This is the general technique used for things like guns and UI that must always be on top.