Contents

custom(sourceRGBBlendFactor:destinationRGBBlendFactor:sourceAlphaBlendFactor:destinationAlphaBlendFactor:alphaBlendOperation:)

Creates a custom blending configuration with explicit Metal blend factors and operations.

Declaration

static func custom(sourceRGBBlendFactor: MTLBlendFactor = .one, destinationRGBBlendFactor: MTLBlendFactor = .zero, sourceAlphaBlendFactor: MTLBlendFactor = .one, destinationAlphaBlendFactor: MTLBlendFactor = .zero, alphaBlendOperation: MTLBlendOperation = .add) -> LowLevelRenderPipelineState.Descriptor.Blending

Parameters

  • sourceRGBBlendFactor:

    The blend factor applied to the source RGB values.

  • destinationRGBBlendFactor:

    The blend factor applied to the destination RGB values.

  • sourceAlphaBlendFactor:

    The blend factor applied to the source alpha value.

  • destinationAlphaBlendFactor:

    The blend factor applied to the destination alpha value.

  • alphaBlendOperation:

    The blend operation used to combine source and destination alpha values.

Return Value

A LowLevelRenderPipelineState.Descriptor.Blending with the specified configuration.

See Also

Creating a blending mode