Add 4-plane support to mask