The remnants of the deprecated ray masking implementation have been removed.
The new ray masking implementation uses the mesh/shape id to distinguish whether a shape is masked or not on a per ray basis.
With this new implementation, each ray can only ignore one specific mesh per call to the intersection kernel. However, the number of unique shapes that can be ignored is only limited by the positive range of a signed integer (MAX_INT - 1).
When ray masking is disabled through the CMake config switch all ray masking checks in the intersection kernels are disabled at compile time to make sure that there is no performance impact when not using the feature.