<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.4.0 -",
    "macOS: 10.15.4 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLRasterizationRateMapDescriptor/layer(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLRasterizationRateMapDescriptor(im)layerAtIndex:"
  },
  "title" : "layer(at:)"
}
-->

# layer(at:)

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

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

## Parameters

`layerIndex`

The entry to return.

## Return Value

The [`MTLRasterizationRateLayerDescriptor`](/documentation/Metal/MTLRasterizationRateLayerDescriptor) instance for the given index, or `nil` if you haven’t set an instance for this index.

## Discussion

Calling this method is equivalent to using array subscript syntax.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)