clearColor
The color to use when clearing the color attachment.
Declaration
var clearColor: MTLClearColor { get set }Discussion
If the loadAction property of the attachment is set to MTLLoadAction.clear, then at the start of a render pass, the GPU fills the texture with the value stored in the clearColor property. Otherwise, the GPU ignores the clearColor property.
The clearColor property represents a set of RGBA components. The default value is (0.0, 0.0, 0.0, 1.0) (black). Use the MTLClearColorMake(_:_:_:_:) function to construct an MTLClearColor value.