customSamplePositions
An option that stores data in a sample-position–agnostic representation.
Declaration
static var customSamplePositions: MTLStoreActionOptions { get }Mentioned in
Discussion
Set this option only on an MTLRenderPassColorAttachmentDescriptor or MTLRenderPassDepthAttachmentDescriptor instance. Setting this option on an MTLRenderPassStencilAttachmentDescriptor instance or combining it with a nonstore storeAction value results in a runtime error.
Set this action when you need to read the data in a subsequent render pass or blit operation that is unaware of the programmable sample positions used to generate the data. You should set this option when, for example, reading per-sample data within a fragment function that uses different programmable sample positions.
If you specify this action, Metal may decompress the depth render target and store the resulting data in its decompressed form. If you don’t change programmable sample positions in a subsequent render pass, use MTLStoreAction.store instead to improve performance.