I'm using render layers in my scene to seperate multiple objects for compositing, but want to add them back together afterwards.
For that, I need to a way to hide parts of the volumes on layer 2, that would appear behind objects on layer 1, if they were on the same layer:
Layer 1:
Layer 2:
For example, the volume lights on the front should be partially hidden, since the Submarine on layer 2 would obscure them, but the light in the back should be fully visible, since it would be in front of the Submarine.
How can I achieve this in Blender?
Older versions seem to have included "mask layers", but I can't seem to find any mention of them from 2.8 and onward...