Is masking performance costly?

You can get the same effect by ensuring that triangle area is zero.