-
-
Save lili2012/044ef4a3ca12acbc0758ff65cce44031 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mode out color out alpha | |
-------------- -------------- ----------- | |
layer/over: ( sc+(1-sa)*dc , sa+da-sa*da ) | |
multiply: ( sc*dc , sa+da-sa*da ) | |
screen: ( sa*da - (da-dc)*(sa-sc) , sa+da-sa*da ) | |
lighten: ( max(sa*dc,sc*da) , sa+da-sa*da ) | |
darken: ( min(sa*dc,sc*da) , sa+da-sa*da ) | |
add: ( min(dc+sc,1) , min(sa+da,1) ) | |
subtract: ( max(dc-sc,0) , min(sa+da,1) ) | |
difference: ( abs(sa*dc-sc*da) , sa+da-sa*da ) | |
invert: ( sa*(da-dc) , sa+da-sa*da ) | |
overlay: ( dc < da/2.0 ? (2.0*sc*dc) : (sa*da - 2.0*(da-dc)*(sa-sc)) , sa+da-sa*da ) | |
hardlight: ( sc < sa/2.0 ? (2.0*sc*dc) : (sa*da - 2.0*(da-dc)*(sa-sc)) , sa+da-sa*da ) | |
sc = source color, sa = source alpha, dc = dest color, da = dest alpha |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment