I was adding some custom shaders to the UI elements, and noticed that some are not rendering in Orthographic camera mode. I figured that if there is some object that the camera is looking at, then the UI element from the 2D screen gets overwritten with it. I suppose it has something to do with the depth writing? However, changing the depthWrite attribute didn’t help. It also doesn’t look like blend type is the cause. I’ve made a small project to show my problem:
Both UI elements are in the same 2D Screen. However, the blue one on the left is a normal one, while the one on the right has a custom shader (simple red color). You can see, that the red element is cut off by the plane in the background.