I am trying to simulate the Adobe Photoshop's blending mode - Darken.
I understand the basic Darken principle : Darken(a,b) = min(a,b). E.g.:
Darken( (.2, .3, .8), (.5, .1, .4) ) = (.2, .1, .4) // (r, g, b)
But I have transparency in it. In Photoshop, Darken works this way:
Darken( (0, 1, 0, .5), (0, 0, 0, .5) ) = (0, .3, 0, .75) // (r, g, b, a)
Darkening green over black is green. I see, that output alpha is computed in classic way: ao = aa + ab * (1-aa). Do you know how the other values are computed?
BTW. Darken mode is commutative.