A color render target that specifies the color configuration and color operations associated with a render pipeline.
SDKs
- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Metal
Declaration
class MTLRenderPipelineColorAttachmentDescriptor : NSObject
Overview
A MTLRender
object defines the configuration of a color attachment associated with a rendering pipeline.
The pixel
property must 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
is
property enables blending. The default value isBlending Enabled false
.The
write
property identifies which color channels are blended. The default value isMask all
, which allows all color channels to be blended.The
rgb
andBlend Operation alpha
properties assign the blend operations for RGB and alpha pixel data. The default value for both properties isBlend Operation MTLBlend
.Operation .add The
source
,RGBBlend Factor source
,Alpha Blend Factor destination
, andRGBBlend Factor destination
properties assign the source and destination blend factors. The default value forAlpha Blend Factor source
andRGBBlend Factor source
isAlpha Blend Factor MTLBlend
. The default value forFactor .one destination
andRGBBlend Factor destination
isAlpha Blend Factor MTLBlend
.Factor .zero