Last active
January 10, 2024 19:33
-
-
Save XProger/c02b1b3de662ed651380 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