Here is an example with .customDepthMaterial: Mesh points to the camera on only 2 axis with shaders - #10 by prisoner849
.customDepthMaterial