---
title: viewportArrayIndexOffset
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlvertexamplificationviewmapping/viewportarrayindexoffset
---

# viewportArrayIndexOffset

An offset into the list of viewports.

## Declaration

```swift
var viewportArrayIndexOffset: UInt32
```

## Mentioned in

Improving rendering performance with vertex amplification

## Discussion

Discussion To specify a list of offsets, call the setVertexAmplificationCount(_:viewMappings:) method. When your app renders to different render targets, you specify the render target index to render to in your vertex shader by adding the viewport_array_index attribute to one of the vertex shader’s outputs. If you are using vertex amplification, Metal calculates the index for each amplified vertex by adding the index offset for the vertex to the value returned from your shader.

## See Also

### Specifying mapping offsets

- [renderTargetArrayIndexOffset](metal/mtlvertexamplificationviewmapping/rendertargetarrayindexoffset.md)
