<!--
{
  "availability" : [
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CompositorServices",
  "identifier" : "/documentation/CompositorServices/LayerRenderer/Configuration-swift.struct/drawableRenderContextStencilFormat",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Compositor Services",
      "CompositorServices"
    ],
    "preciseIdentifier" : "s:So27CP_OBJECT_cp_layer_rendererC18CompositorServicesE13ConfigurationV34drawableRenderContextStencilFormatSo08MTLPixelM0Vvp"
  },
  "title" : "drawableRenderContextStencilFormat"
}
-->

# drawableRenderContextStencilFormat

The metal pixel format matching that of the stencil texture used in the layer renderer drawable’s render context.

```
var drawableRenderContextStencilFormat: MTLPixelFormat { get set }
```

## Discussion

This value corresponds to the pixel format of the stencil texture you attach to your Metal pipeline.

> Note: For more information, see <doc://com.apple.documentation/documentation/Metal/MTLRenderPassAttachmentDescriptor>.

---

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)