<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer24LowLevelMaterialResourceC"
  },
  "title" : "LowLevelMaterialResource"
}
-->

# LowLevelMaterialResource

A compiled material composed of three independently-replaceable shader functions.

```
final class LowLevelMaterialResource
```

## Overview

A `LowLevelMaterialResource` combines a `GeometryModifier` shader function, a
`SurfaceShader` function, and a `LightingFunction` (lighting evaluation). Each
function can receive per-draw parameters through its own `LowLevelArgumentTable`, described
by `LowLevelArgumentTable.Descriptor`.

Create a `LowLevelMaterialResource` by building a [`LowLevelMaterialResource.Descriptor`](/documentation/RealityKit/LowLevelMaterialResource/Descriptor) from the three shader
functions and passing it to [`makeMaterialResource(descriptor:)`](/documentation/RealityKit/LowLevelRenderContext/makeMaterialResource(descriptor:)).

## Topics

### Describing the material

[`struct Descriptor`](/documentation/RealityKit/LowLevelMaterialResource/Descriptor)

The geometry modifier, surface shader, and lighting function for a material.

[`struct SimpleSurfaceDescriptor`](/documentation/RealityKit/LowLevelMaterialResource/SimpleSurfaceDescriptor)

The configuration for a built-in surface shader that applies a tint color, a texture, or both.

### Configuring the shaders

[`var surface: LowLevelMaterialResource.SurfaceShader`](/documentation/RealityKit/LowLevelMaterialResource/surface)

The compiled fragment-stage surface shader.

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

A compiled Metal function that implements the surface shader function.

[`var geometry: LowLevelMaterialResource.GeometryModifier`](/documentation/RealityKit/LowLevelMaterialResource/geometry)

The compiled vertex-stage geometry modifier.

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

A compiled Metal function that implements the geometry modifier function.

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

A compiled Metal function that evaluates lighting.

[`protocol Function`](/documentation/RealityKit/LowLevelMaterialResource/Function)

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

### Reading shader graph output

[`struct ShaderGraphOutput`](/documentation/RealityKit/LowLevelMaterialResource/ShaderGraphOutput)

The compiled Metal shader functions derived from a ShaderGraph.

### Instance Properties

[`var lighting: LowLevelMaterialResource.LightingFunction`](/documentation/RealityKit/LowLevelMaterialResource/lighting)

The compiled lighting evaluation function.

## Relationships

### Conforms To

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

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

---

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)