In what exact way does each mask mode affect the alpha channel of the masked layer?
I've been scratching my head for quite sometime now understanding how mask modes work. The end results seem so abritary to me.
From what I noticed when a mask is set to "add" and there's just a single mask, inside the mask the original alpha values (0 to 1) of the layer gets multiplied by the opacity of the mask (0 to 1) and outside the mask the original alpha values of the layer gets multiplied by 0. So if I have a mask with opacity 70%, with "Add" selected, inside the mask a pixel whose original alpha from the layer was 0.9 (say), its final alpha would be 0.9*0.7. This is consistent with what I see happening in the software. Even though I really don't understand what kind of "adding" is into play here.
For "subtract" the results are even more bizarre. It behaves just like inverted mask. I just can't understand how the alpha values are influenced.
When there are multiple overlapping masks, the end result is something completely different.
Are there any specific rules that dictate how each mode determines the alpha channel of the layer? Like a mathematical expression relating the final alpha and the mask alpha?
