Setting the “Opacity Mask Clip Value” in the details panel of the material saved me! As long as the material shows in the world (opacity > 0), it will be rendered in the custom depth buffer. No need for a shadow mesh to render into the custom depth buffer anymore!
2 Likes