Enumeration

MTLBlendFactor

The source and destination blend factors are often needed to complete specification of a blend operation. In most cases, the blend factor for both RGB values (F(rgb)) and alpha values (F(a)) are similar to one another, but in some cases, such as MTLBlendFactorSourceAlphaSaturated, the blend factor is slightly different. Four blend factors (MTLBlendFactorBlendColor, MTLBlendFactorOneMinusBlendColor, MTLBlendFactorBlendAlpha, and MTLBlendFactorOneMinusBlendAlpha) refer to a constant blend color value that is set by the setBlendColorRed:green:blue:alpha: method of MTLRenderCommandEncoder.

Declaration

typedef enum MTLBlendFactor : NSUInteger {
    ...
} MTLBlendFactor;

Topics

Constants

MTLBlendFactorZero

Blend factor of zero.

MTLBlendFactorOne

Blend factor of one.

MTLBlendFactorSourceColor

Blend factor of source values.

MTLBlendFactorOneMinusSourceColor

Blend factor of one minus source values.

MTLBlendFactorSourceAlpha

Blend factor of source alpha.

MTLBlendFactorOneMinusSourceAlpha

Blend factor of one minus source alpha.

MTLBlendFactorDestinationColor

Blend factor of destination values.

MTLBlendFactorOneMinusDestinationColor

Blend factor of one minus destination values.

MTLBlendFactorDestinationAlpha

Blend factor of destination alpha.

MTLBlendFactorOneMinusDestinationAlpha

Blend factor of one minus destination alpha.

MTLBlendFactorSourceAlphaSaturated

Blend factor of the minimum of either source alpha or one minus destination alpha.

MTLBlendFactorBlendColor

Blend factor of RGB values.

MTLBlendFactorOneMinusBlendColor

Blend factor of one minus RGB values.

MTLBlendFactorBlendAlpha

Blend factor of alpha value.

MTLBlendFactorOneMinusBlendAlpha

Blend factor of one minus alpha value.

MTLBlendFactorSource1Color

Blend factor of source values. This option supports dual-source blending and reads from the second color output of the fragment function.

MTLBlendFactorOneMinusSource1Color

Blend factor of one minus source values. This option supports dual-source blending and reads from the second color output of the fragment function.

MTLBlendFactorSource1Alpha

Blend factor of source alpha. This option supports dual-source blending and reads from the second color output of the fragment function.

MTLBlendFactorOneMinusSource1Alpha

Blend factor of one minus source alpha. This option supports dual-source blending and reads from the second color output of the fragment function.