<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelRenderer/Configuration/stencilAttachmentPixelFormat",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer08LowLevelC0C13ConfigurationV28stencilAttachmentPixelFormatSo08MTLPixelJ0Vvp"
  },
  "title" : "stencilAttachmentPixelFormat"
}
-->

# stencilAttachmentPixelFormat

The pixel format of the stencil attachment in the render pass the renderer encodes into.

```
var stencilAttachmentPixelFormat: MTLPixelFormat { get }
```

## Discussion

Relevant when the render pass uses a separate stencil attachment rather than a
packed depth-stencil format. Use this format when compiling your own
`MTLRenderPipelineState` objects for draw calls issued inside the
`render(using:_:)` callback.

---

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)