---
title: "subscript(_:)"
framework: metal
role: symbol
role_heading: Instance Subscript
path: "metal/mtlrasterizationratelayerarray/subscript(_:)"
---

# subscript(_:)

Retrieves the sample value at the specified index.

## Declaration

```swift
subscript(layerIndex: Int) -> MTLRasterizationRateLayerDescriptor? { get set }
```

## Parameters

- `layerIndex`: The index of the sample you want to retrieve.

## Return Value

Return Value An NSNumber instance describing the value of the sample at the specified index, or 0 if the index is out of range.

## See Also

### Accessing members of the array

- [MTLRasterizationRateLayerDescriptor](metal/mtlrasterizationratelayerdescriptor.md)
