You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was comparing color blending functions and I noticed this one did not seem to be symmetrical
(swapping a,b and using 1-t instead if t, is expected to give the same result)
I think the reason is that this expression in helpers.c
opa_a * a[3] / (a[3] + b[3] * opa_b);
Should probably be
opa_a * a[3] / (opa_a * a[3] + b[3] * opa_b);
since blending.hpp from mypaint is using
Sa / (Sa + one_minus_Sa * dst[i+3] / (1<<15));
Not entirely sure since I translated the code to another language first,
but adding opa_a seem to solve the issue I was having, so I will just leave this here...
The text was updated successfully, but these errors were encountered:
I was comparing color blending functions and I noticed this one did not seem to be symmetrical
(swapping a,b and using 1-t instead if t, is expected to give the same result)
I think the reason is that this expression in helpers.c
Should probably be
since blending.hpp from mypaint is using
Not entirely sure since I translated the code to another language first,
but adding opa_a seem to solve the issue I was having, so I will just leave this here...
The text was updated successfully, but these errors were encountered: