---
title: slice
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlrenderpassattachmentdescriptor/slice
---

# slice

The slice of the texture used for rendering to the attachment.

## Declaration

```swift
var slice: Int { get set }
```

## Discussion

Discussion The default value is 0.

## See Also

### Specifying the texture for the attachment

- [texture](metal/mtlrenderpassattachmentdescriptor/texture.md)
- [level](metal/mtlrenderpassattachmentdescriptor/level.md)
- [depthPlane](metal/mtlrenderpassattachmentdescriptor/depthplane.md)
