W3cubDocs

/LÖVE

BlendMode

Different ways to do color blending. See BlendAlphaMode and the BlendMode Formulas for additional notes.

Constants

alpha
Alpha blending (normal). The alpha of what's drawn determines its opacity.
replace Available since 0.9.0
The colors of what's drawn completely replace what was on the screen, with no additional blending. The BlendAlphaMode specified in love.graphics.setBlendMode still affects what happens.


screen Available since 0.9.1
'Screen' blending.


add Available since 0.10.0
The pixel colors of what's drawn are added to the pixel colors already on the screen. The alpha of the screen is not modified.
subtract Available since 0.10.0
The pixel colors of what's drawn are subtracted from the pixel colors already on the screen. The alpha of the screen is not modified.
multiply Available since 0.10.0
The pixel colors of what's drawn are multiplied with the pixel colors already on the screen (darkening them). The alpha of drawn objects is multiplied with the alpha of the screen rather than determining how much the colors on the screen are affected, even when the "alphamultiply" BlendAlphaMode is used.


lighten Available since 0.10.1
The pixel colors of what's drawn are compared to the existing pixel colors, and the larger of the two values for each color component is used. Only works when the "premultiplied" BlendAlphaMode is used in love.graphics.setBlendMode.
darken Available since 0.10.1
The pixel colors of what's drawn are compared to the existing pixel colors, and the smaller of the two values for each color component is used. Only works when the "premultiplied" BlendAlphaMode is used in love.graphics.setBlendMode.


additive Removed in 0.10.0
Additive blend mode.


subtractive Available since 0.7.0 and removed in LÖVE 0.10.0
Subtractive blend mode.
multiplicative Available since 0.7.0 and removed in LÖVE 0.10.0
Multiply blend mode.


premultiplied Available since 0.8.0 and removed in LÖVE 0.10.0
Premultiplied alpha blend mode.


See Also


© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/BlendMode