<!--
{
  "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/MTLRasterizationRateLayerArray/setObject:atIndexedSubscript:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLRasterizationRateLayerArray(im)setObject:atIndexedSubscript:"
  },
  "title" : "setObject:atIndexedSubscript:"
}
-->

# setObject:atIndexedSubscript:

Stores a sample value at the specified index.

```
- (void) setObject:(MTLRasterizationRateLayerDescriptor *) layer atIndexedSubscript:(NSUInteger) layerIndex;
```

## Parameters

`layer`

The layer descriptor to set

`layerIndex`

The index of the sample you want to set.

## Discussion

The method converts the value to a single precision floating point value.

---

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)