#[non_exhaustive]pub enum BlendMode {
Show 19 variants
Normal,
Add,
Multiply,
Screen,
Subtract,
Overlay,
Darken,
Lighten,
ColorDodge,
ColorBurn,
HardLight,
SoftLight,
Difference,
Exclusion,
Hue,
Saturation,
Color,
Luminosity,
AlphaMask,
}Expand description
How a shader draw is composited with the destination.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Normal
Standard source-over compositing (premultiplied alpha).
Add
Adds source and destination.
Multiply
Multiplies source and destination.
Screen
Inverts the product of inverted source and destination.
Subtract
Subtracts the source from the destination.
Overlay
Combines Multiply and Screen using the destination as the mask.
Darken
Keeps the darker of source and destination.
Lighten
Keeps the lighter of source and destination.
ColorDodge
Brightens the destination to reflect the source.
ColorBurn
Darkens the destination to reflect the source.
HardLight
Combines Multiply and Screen using the source as the mask.
SoftLight
Softens the contrast between source and destination.
Difference
Absolute difference between source and destination.
Exclusion
Inverted difference with lower contrast.
Hue
Takes hue from the source and saturation/lightness from the destination.
Saturation
Takes saturation from the source and hue/lightness from the destination.
Color
Takes hue and saturation from the source and lightness from the destination.
Luminosity
Takes lightness from the source and hue/saturation from the destination.
AlphaMask
Selects the source where the destination is opaque.