I have to ask the question, what is it you're trying to do..?

Masking is one trick to prevent overdraw performance hits by ensuring that sprites can be drawn in any order. If the system you're writing for has enough oomph, you don't need to worry too much about it.. in fact, it might slow your game down if you do too much. If you're making an isometric engine, just render left to right from the top down, only skipping sprites which are wholly obscured.

Unless you get performance issues while rendering, I would just make sure things were rendered in the correct order so that background objects don't obscure foreground objects.. masking would be something I'd worry about last and even then, after I'd exhausted all other optimisation tricks.

If you have a list of sprites to render, sort them by their Z axis, then they will always be drawn on top of eachother in the correct order. Unless you're doing something else, anything else will be overkill and bug prone.


My basic rule is:
get it working properly first, then optimise. It's OK to think about opimisation, but don't implement it until you're sure you need it. You may end up crippling yourself by concentrating on a problem which wasn't as bad as you thought it was.

Unless you're thinking about something else...

let me know what you're thinking.