Translucent material are not rendered to custom depth. You can either do what I did and modify the engine to include them or have a duplicate mesh with a basic non translucent material and uncheck “render in main pass” for the duplicate. This will stop the duplicate mesh from being visible but will allow it to be rendered to the custom depth buffer.