---
title: depthAttachment
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlrenderpassdescriptor/depthattachment
---

# depthAttachment

State information for an attachment that stores depth data.

## Declaration

```swift
@NSCopying var depthAttachment: MTLRenderPassDepthAttachmentDescriptor! { get set }
```

## See Also

### Specifying the attachments for a rendering pass

- [colorAttachments](metal/mtlrenderpassdescriptor/colorattachments.md)
- [stencilAttachment](metal/mtlrenderpassdescriptor/stencilattachment.md)
