<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLRenderPipelineColorAttachmentDescriptor"
  },
  "title" : "MTLRenderPipelineColorAttachmentDescriptor"
}
-->

# MTLRenderPipelineColorAttachmentDescriptor

A color render target that specifies the color configuration and color operations for a render pipeline.

```
class MTLRenderPipelineColorAttachmentDescriptor
```

## Overview

An [`MTLRenderPipelineColorAttachmentDescriptor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor) instance defines the configuration of a color attachment associated with a rendering pipeline.

The [`pixelFormat`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/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`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/isBlendingEnabled) property enables blending. The default value is <doc://com.apple.documentation/documentation/Swift/false>.
- The [`writeMask`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/writeMask) property identifies which color channels are blended. The default value is [`all`](/documentation/Metal/MTLColorWriteMask/all), which allows all color channels to be blended.
- The [`rgbBlendOperation`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/rgbBlendOperation) and [`alphaBlendOperation`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/alphaBlendOperation) properties assign the blend operations for RGB and alpha pixel data. The default value for both properties is [`MTLBlendOperation.add`](/documentation/Metal/MTLBlendOperation/add).
- The [`sourceRGBBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/sourceRGBBlendFactor), [`sourceAlphaBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/sourceAlphaBlendFactor), [`destinationRGBBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/destinationRGBBlendFactor), and [`destinationAlphaBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/destinationAlphaBlendFactor) properties assign the source and destination blend factors. The default value for [`sourceRGBBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/sourceRGBBlendFactor) and [`sourceAlphaBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/sourceAlphaBlendFactor) is [`MTLBlendFactor.one`](/documentation/Metal/MTLBlendFactor/one). The default value for [`destinationRGBBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/destinationRGBBlendFactor) and [`destinationAlphaBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/destinationAlphaBlendFactor) is [`MTLBlendFactor.zero`](/documentation/Metal/MTLBlendFactor/zero).

## Topics

### Configuring render pipeline states

[`pixelFormat`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/pixelFormat)

The pixel format of the color attachment’s texture.

[`writeMask`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/writeMask)

A bitmask that restricts which color channels are written into the texture.

[`MTLColorWriteMask`](/documentation/Metal/MTLColorWriteMask)

Values used to specify a mask to permit or restrict writing to color channels of a color value.

### Controlling blend operations

[`isBlendingEnabled`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/isBlendingEnabled)

A Boolean value that determines whether blending is enabled.

[`alphaBlendOperation`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/alphaBlendOperation)

The blend operation assigned for the alpha data.

[`rgbBlendOperation`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/rgbBlendOperation)

The blend operation assigned for the RGB data.

[`MTLBlendOperation`](/documentation/Metal/MTLBlendOperation)

For every pixel, `MTLBlendOperation` determines how to combine and weight the source fragment values with the destination values. Some blend operations multiply the source values by a source blend factor (SBF), multiply the destination values by a destination blend factor (DBF), and then combine the results using addition or subtraction. Other blend operations use either a minimum or maximum function to determine the result.

### Configuring blend factors

[`destinationAlphaBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/destinationAlphaBlendFactor)

The destination blend factor (DBF) used by the alpha blend operation.

[`destinationRGBBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/destinationRGBBlendFactor)

The destination blend factor (DBF) used by the RGB blend operation.

[`sourceAlphaBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/sourceAlphaBlendFactor)

The source blend factor (SBF) used by the alpha blend operation.

[`sourceRGBBlendFactor`](/documentation/Metal/MTLRenderPipelineColorAttachmentDescriptor/sourceRGBBlendFactor)

The source blend factor (SBF) used by the RGB blend operation.

[`MTLBlendFactor`](/documentation/Metal/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 [`setBlendColor(red:green:blue:alpha:)`](/documentation/Metal/MTLRenderCommandEncoder/setBlendColor(red:green:blue:alpha:)) method of `MTLRenderCommandEncoder`.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)