w3c / fxtf-drafts

Mirror of https://hg.fxtf.org/drafts
https://drafts.fxtf.org/
Other
68 stars 49 forks source link

[compositing-2] Porter Duff Compositing Operators #458

Open letochagone opened 2 years ago

letochagone commented 2 years ago

https://drafts.fxtf.org/compositing-2/#porterduffcompositingoperators_plus_darker

in sections plus-darker and plus-lighter there is the use of max and min functions. I understand the functions max(a,b) and min(a,b) when a and b are scalars. But not if one of the arguments is a vector.

co = min(1, αs x Cs + αb x Cb) first argument "1" is a scalar, and second αs x Cs + αb x Cb is a vector. Why no description in this case?

dbaron commented 2 years ago

I think the text could probably be clearer about which of these formulas are applied per-color-component, which of them also apply to the alpha components, and which (if any) apply to vectors. I think most of the formulas given are really per-color-component formulas, some (??) of which also apply to the alpha component. (I thought it used to be clearer, but I can't find the text I'm remembering.)