Having to implement it separately in each material's shader is not
optimal, but since they each define their own uniform block, no better
solution is readily apparent.
The occluder shader also supports alpha cutoff so that objects with
such materials can cast proper shadows.