<!--
{
  "availability" : [
    "iOS: 11.0.0 - 27.0.0",
    "iPadOS: 11.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.13.0 - 27.0.0",
    "tvOS: 11.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLStoreActionOptions/customSamplePositions",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLStoreActionOptions@MTLStoreActionOptionCustomSamplePositions"
  },
  "title" : "customSamplePositions"
}
-->

# customSamplePositions

An option that stores data in a sample-position–agnostic representation.

```
static var customSamplePositions: MTLStoreActionOptions { get }
```

## Discussion

Set this option only on an [`MTLRenderPassColorAttachmentDescriptor`](/documentation/Metal/MTLRenderPassColorAttachmentDescriptor) or [`MTLRenderPassDepthAttachmentDescriptor`](/documentation/Metal/MTLRenderPassDepthAttachmentDescriptor) instance. Setting this option on an [`MTLRenderPassStencilAttachmentDescriptor`](/documentation/Metal/MTLRenderPassStencilAttachmentDescriptor) instance or combining it with a nonstore [`storeAction`](/documentation/Metal/MTLRenderPassAttachmentDescriptor/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`](/documentation/Metal/MTLStoreAction/store) instead to improve performance.

---

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)