<!--
{
  "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.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Equatable`](/documentation/Swift/Equatable)

### Inherits From

[`MTLRenderPassAttachmentDescriptor`](/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)