<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLRenderPassStencilAttachmentDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLRenderPassStencilAttachmentDescriptor"
  },
  "title" : "MTLRenderPassStencilAttachmentDescriptor"
}
-->

# MTLRenderPassStencilAttachmentDescriptor

A stencil render target that serves as the output destination for stencil pixels generated by a render pass.

```
class MTLRenderPassStencilAttachmentDescriptor
```

## Topics

### Specifying the resolve filter

[`stencilResolveFilter`](/documentation/Metal/MTLRenderPassStencilAttachmentDescriptor/stencilResolveFilter)

The filter used for stencil multisample resolve.

### Specifying the stencil clear value

[`clearStencil`](/documentation/Metal/MTLRenderPassStencilAttachmentDescriptor/clearStencil)

The value to use when clearing the stencil attachment.



---

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)