<!--
{
  "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/MTLRasterizationRateMap/copyParameterData(buffer:offset:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLRasterizationRateMap(im)copyParameterDataToBuffer:offset:"
  },
  "title" : "copyParameterData(buffer:offset:)"
}
-->

# copyParameterData(buffer:offset:)

Copies the parameter data into the provided buffer.

```
func copyParameterData(buffer: any MTLBuffer, offset: Int)
```

## Parameters

`buffer`

The buffer instance to copy the data into. It needs to have an [`MTLStorageMode.shared`](/documentation/Metal/MTLStorageMode/shared) storage mode, and there needs to be enough room in the buffer to store the data.

`offset`

The location in the buffer to copy the data to. The offset needs to be a multiple of the parameter alignment.

## Discussion

To convert coordinate values inside your shader, pass the rate map data into the shader in an [`MTLBuffer`](/documentation/Metal/MTLBuffer) instance.
The [`parameterDataSizeAndAlign`](/documentation/Metal/MTLRasterizationRateMap/parameterDataSizeAndAlign) property provides the size and alignment requirements for the buffer.

You can convert between screen space and physical fragment space by binding the buffer to the shader with type `rasterization_rate_map_data`, then constructing `rasterization_rate_map_decoder` with the buffer data.
For more details, see the “Variable Rasterization Rate” section of the [Metal Shading Language Specification](https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf).

---

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)