Instance Method

setBlendColorRed:green:blue:alpha:

Specifies the constant blend color and alpha values.

Required.

Declaration

- (void)setBlendColorRed:(float)red green:(float)green blue:(float)blue alpha:(float)alpha;

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 MTLBlendFactorBlendColor and MTLBlendFactorOneMinusBlendColor blend factors. The alpha value can be used with the MTLBlendFactorBlendAlpha and MTLBlendFactorOneMinusBlendAlpha blend factors.

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software