In the video above, they seem to raycast from the camera to the object’s center, and based on hit / no-hit they simply swap the material. It does not render half of it normally and half of it behind, always whole object based on the center.
Was there ever a solution for this that was purely shader based, eg without swapping materials based on a raycast, but highlighting just the part of an object that’s obscured by another object?