olofson / eel

The Extensible Embeddable Language for scripting in realtime applications
http://eelang.org/
zlib License
46 stars 4 forks source link

TIPE: Layer "opacity" control #104

Open olofson opened 7 years ago

olofson commented 7 years ago

Add a GIMP/PhotoShop style layer opacity control, which sets the balance between the original target image, and the target image with the layer fully applied.

For the "normal" blend mode, the "opacity" parameter would literally be opacity (alpha).

For "multiply", it controls the depth of modulation, where 0 means "unaffected", or mathematically, replacing the layer with all white.

For "add" mode, "opacity" is multiplied with the layer channels, so that 0 makes the layer all black (which means no effect when adding), and 1 leaves the layer channels unaffected, and thus, fully applied.

It would probably be useful to allow "opacity" values outside the [0, 1] range.