Instance Method

setBlendColor(red:green:blue:alpha:)

Specifies the constant blend color and alpha values.

Required.

Declaration

func setBlendColor(red: Float, green: Float, blue: Float, alpha: Float)

Parameters

red

The constant red blend value.

green

The constant green blend value.

blue

The constant blue blend value.

alpha

The constant alpha blend value.

Discussion

The constant blend color and alpha values apply for all attachments used by this encoder. You can use the red, green, and blue values with the MTLBlendFactor.blendColor and MTLBlendFactor.oneMinusBlendColor blend factors. The alpha value can be used with the MTLBlendFactor.blendAlpha and MTLBlendFactor.oneMinusBlendAlpha blend factors.

The default value is (0, 0, 0, 0), which is MTLBlendFactor.zero. For other values, see MTLBlendFactor.