---
title: "layer(at:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlrasterizationratemapdescriptor/layer(at:)"
---

# layer(at:)

Returns the layer description for a layer in the rate map.

## Declaration

```swift
func layer(at layerIndex: Int) -> MTLRasterizationRateLayerDescriptor?
```

## Parameters

- `layerIndex`: The entry to return.

## Return Value

Return Value The MTLRasterizationRateLayerDescriptor instance for the given index, or nil if you haven’t set an instance for this index.

## Discussion

Discussion Calling this method is equivalent to using array subscript syntax.

## See Also

### Configuring the rate map layers

- [layerCount](metal/mtlrasterizationratemapdescriptor/layercount.md)
- [setLayer(_:at:)](metal/mtlrasterizationratemapdescriptor/setlayer(_:at:).md)
- [layers](metal/mtlrasterizationratemapdescriptor/layers.md)
- [MTLRasterizationRateLayerArray](metal/mtlrasterizationratelayerarray.md)
