Factorio.com|Forums|Wiki|Mod Portal|API Docs Prototype|Runtime|Auxiliary

# Factorio Prototype Docs Version 2.0.7

## BlendMode :: union

Determines how sprites/animations should blend with the background. The possible values are listed below.

Note that in most of Factorio it is assumed colors are in alpha pre-multiplied format, see FFF #172 - Blending and Rendering. Sprites get pre-multiplied when loaded, unless `premul_alpha` is set to `false` on the sprite/animation itself. Since generating mipmaps doesn't respect `premul_alpha`, lower mipmap levels will be in pre-multiplied format regardless.

#### Union members

`"normal"` | The result color is determined with the following formula: `Result = Active_RGB + Background_RGB * ( 1 - Active_Alpha )`. Note that this is alpha blending with an assumption that `Active_RGB` is already pre-multiplied with `Active_Alpha`.
`"additive"` | The result color is determined with the following formula: `Result = Active_RGB + Background_RGB`
`"additive-soft"` | The result color is determined with the following formula: `Result = Active_RGB * ( 1 - Background_RGB ) + Background_RGB`
`"multiplicative"` | The result color is determined with the following formula: `Result = Active_RGB * Background_RGB`
`"multiplicative-with-alpha"` | The result color is determined with the following formula: `Result = Active_RGB * Background_RGB * Active_Alpha + Background_RGB * ( 1 - Active_Alpha )`
`"overwrite"` | The result color is determined with the following formula: `Result = Active_RGBA or Background_RGBA`

Type used in

- AnimationPrototype::blend_mode
- SpriteParameters::blend_mode
- SpritePrototype::blend_mode