<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelMaterialResource/Function",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer24LowLevelMaterialResourceC8FunctionP"
  },
  "title" : "LowLevelMaterialResource.Function"
}
-->

# LowLevelMaterialResource.Function

A compiled shader function that can receive per-draw parameters via an argument table.

```
protocol Function : Sendable
```

## Topics

### Configuring the function

[`var parameterMapping: LowLevelMaterialParameterMapping?`](/documentation/RealityKit/LowLevelMaterialResource/Function/parameterMapping)

The parameter name-to-slot mapping for this function, used to look up binding indices
by name at runtime, or `nil` if the function takes no custom parameters.

[`var argumentTableDescriptor: LowLevelArgumentTable.Descriptor?`](/documentation/RealityKit/LowLevelMaterialResource/Function/argumentTableDescriptor)

The argument table descriptor that describes the buffer and texture slots this function
requires, or `nil` if the function takes no per-draw arguments.

## Relationships

### Conforming Types

[`GeometryModifier`](/documentation/RealityKit/LowLevelMaterialResource/GeometryModifier)

[`LightingFunction`](/documentation/RealityKit/LowLevelMaterialResource/LightingFunction)

[`SurfaceShader`](/documentation/RealityKit/LowLevelMaterialResource/SurfaceShader)

### Inherits From

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)