WIP: generic depth masking