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
{{ message }}
Repository navigation
Better transparency handling with math ops and blending functions? #1675
I was playing with #1673 issue, specifically thinking of more reasonable alpha calculation and found that things go a bit wider than just a proper alpha op. Beside math ops, there are also color blending functions that totally ignore alpha channels and always return non-transparent colors (so blending functions don't suffer from #1673 :).
E.g.:
Additionally it seems that ideally tree.Color op tree.Dimension and tree.Color op tree.Color where op is * or / operations should be handled in different ways, e.g.:
mul {
a: (#800000 * 2); // -> #ff0000, OK
b: (#100000 * #100000); // -> #ff0000, i.e. ~black * ~black = red :)
// could it be blending `multiply` instead?
}
Of course all this will need a lot of code changes so that "demand/efforts ratio" becomes questionable, but I just wanted to have some food for thought.
So transparency for blending functions is implemented with #1704. And as for transparency of math ops I guess I abandon/postpone this idea since it does not seems like possible use-cases are worth an efforts needed and an additional complier burden (Though the research for possible algorithms was quite inspirational on its own :)
Activity
seven-phases-max commentedon Sep 3, 2014
So transparency for blending functions is implemented with #1704. And as for transparency of math ops I guess I abandon/postpone this idea since it does not seems like possible use-cases are worth an efforts needed and an additional complier burden (Though the research for possible algorithms was quite inspirational on its own :)