---
title: renderTargetArrayLength
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlrenderpassdescriptor/rendertargetarraylength
---

# renderTargetArrayLength

The number of active layers that all attachments need to have for layered rendering.

## Declaration

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

## Mentioned in

Rendering to multiple texture slices in a draw command

## Discussion

Discussion The default value is 0, indicating that the GPU does not use layered rendering on this render pass. The table below gives typical values you might set, depending on the type of texture being used as attachments in the render pass. Your vertex shader need to select the render target array index between 0 and the array length minus 1.  |   |   |   |

## See Also

### Layered rendering

- [renderTargetWidth](metal/mtlrenderpassdescriptor/rendertargetwidth.md)
- [renderTargetHeight](metal/mtlrenderpassdescriptor/rendertargetheight.md)
