User:Pongles/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.
Available since LÖVE 0.9.0
- replace
- 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.
Available since LÖVE 0.9.1
- screen
- 'Screen' blending.
Available since LÖVE 0.10.0
- add
- 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
- 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
- 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.
Available since LÖVE 0.10.1
- lighten
- 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
- 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.
Removed in LÖVE 0.10.0
- additive
- Additive blend mode.
- subtractive
- Subtractive blend mode.
- multiplicative
- Multiply blend mode.
- premultiplied
- Premultiplied alpha blend mode.
See Also
- love.graphics
- BlendMode Formulas
- love.graphics.setBlendMode
- love.graphics.getBlendMode
- BlendAlphaMode
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info