Added masking to passes