---
title: stencilAttachment
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlrenderpassdescriptor/stencilattachment
---

# stencilAttachment

State information for an attachment that stores stencil data.

## Declaration

```swift
@NSCopying var stencilAttachment: MTLRenderPassStencilAttachmentDescriptor! { get set }
```

## See Also

### Specifying the attachments for a rendering pass

- [colorAttachments](metal/mtlrenderpassdescriptor/colorattachments.md)
- [depthAttachment](metal/mtlrenderpassdescriptor/depthattachment.md)
