Nothing fancy, probably add or max (or subtract or min depending on the was the mask itself or the background is rendered).
It's basically how >90% of the 3D films are made today, by generating a depth map by masking.
Users browsing this forum: daniel.koch and 72 guests