MTLRenderPipelineColorAttachmentDescriptor
A color render target that specifies the color configuration and color operations for a render pipeline.
Declaration
class MTLRenderPipelineColorAttachmentDescriptorOverview
An MTLRenderPipelineColorAttachmentDescriptor instance defines the configuration of a color attachment associated with a rendering pipeline.
The pixelFormat property needs to be specified for the rendering pipeline state at the color attachment.
Blend operations determine how a source fragment is combined with a destination value in a color attachment to determine the pixel value to be written. The following properties define whether and how blending is performed:
The isBlendingEnabled property enables blending. The default value is false.
The writeMask property identifies which color channels are blended. The default value is all, which allows all color channels to be blended.
The rgbBlendOperation and alphaBlendOperation properties assign the blend operations for RGB and alpha pixel data. The default value for both properties is MTLBlendOperation.add.
The sourceRGBBlendFactor, sourceAlphaBlendFactor, destinationRGBBlendFactor, and destinationAlphaBlendFactor properties assign the source and destination blend factors. The default value for sourceRGBBlendFactor and sourceAlphaBlendFactor is MTLBlendFactor.one. The default value for destinationRGBBlendFactor and destinationAlphaBlendFactor is MTLBlendFactor.zero.
Topics
Configuring render pipeline states
Controlling blend operations
Configuring blend factors
See Also
Render pipeline states
MTLRenderPipelineStateMTL4RenderPipelineDescriptorMTLRenderPipelineDescriptorMTLRenderPipelineFunctionsDescriptorMTL4MeshRenderPipelineDescriptorMTLMeshRenderPipelineDescriptorMTLPipelineBufferDescriptorMTLPipelineBufferDescriptorArrayMTL4RenderPipelineColorAttachmentDescriptorMTLRenderPipelineColorAttachmentDescriptorArrayMTL4TileRenderPipelineDescriptorMTLTileRenderPipelineDescriptorMTLTileRenderPipelineColorAttachmentDescriptorMTLPipelineOptionMTL4RenderPipelineBinaryFunctionsDescriptor