pub enum BlendFactor {
Show 15 variants
Zero,
One,
SourceColor,
OneMinusSourceColor,
DestinationColor,
OneMinusDestinationColor,
SourceAlpha,
OneMinusSourceAlpha,
DestinationAlpha,
OneMinusDestinationAlpha,
ConstantColor,
OneMinusConstantColor,
ConstantAlpha,
OneMinusConstantAlpha,
SourceAlphaSaturated,
}Expand description
One term of a blend equation: the factor the source or destination value is multiplied by.
A blend state pairs one of these as the source factor and one as the
destination factor, then combines the two results with a
BlendOperation. The conventional alpha-blend pairing is
SourceAlpha as the source and OneMinusSourceAlpha as the
destination, with BlendOperation::Add.
Variants§
Zero
0 — the term contributes nothing.
One
1 — the term passes through unchanged.
SourceColor
The source color, for a source factor; the destination color, for a destination factor.
OneMinusSourceColor
1 minus the source color, for a source factor.
DestinationColor
The destination color, for a source factor; the source color, for a destination factor.
OneMinusDestinationColor
1 minus the destination color, for a source factor.
SourceAlpha
The source alpha.
OneMinusSourceAlpha
1 minus the source alpha. The conventional destination factor for
alpha blending.
DestinationAlpha
The destination alpha, for a destination factor.
OneMinusDestinationAlpha
1 minus the destination alpha, for a source factor.
ConstantColor
The blend constant set via setBlendConstant.
OneMinusConstantColor
1 minus the blend constant.
ConstantAlpha
The alpha of the blend constant.
OneMinusConstantAlpha
1 minus the alpha of the blend constant.
SourceAlphaSaturated
The smaller of the source alpha and 1 - destination alpha, which is
what keeps repeated alpha-blended passes from accumulating
saturation.