Let me put my question this way:
We have an ARGB color $7F00FF00
and we want to blend this color with another ARGB color $FFFF0000
We are using D3DBLEND_SRCALPHA for source blend
And D3DBLEND_INVSRCALPHA for destination blend
Thus resulting color will be:
R = ($00*($7F/$FF))+($FF*(($FF-$7F)/$FF)) = $80
G = ($FF*($7F/$FF))+($00*(($FF-$7F)/$FF)) = $7F
B = ($00*($7F/$FF))+($00*(($FF-$7F)/$FF)) = $00
Resulting RGB color is $807F00
But what happens to alpha channel? Does it get blended too? If same formula applies to alpha channel then the resulting alpha chennel is:
A = ($7F*($7F/$FF))+($FF*(($FF-$7F)/$FF)) = $BF
Am I understanding this correctly, or am I not getting it at all? If I am wrong, could you please explain to me, what is the resulting alpha value in this particular case and how you arrived to it?
Thanks.
Bookmarks