---
title: "makeMaterialResource(descriptor:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/lowlevelrendercontext/makematerialresource(descriptor:)-9nufj"
---

# makeMaterialResource(descriptor:)

Asynchronously compiles a material resource from a geometry modifier, surface shader, and lighting function.

## Declaration

```swift
nonisolated(nonsending) func makeMaterialResource(descriptor: LowLevelMaterialResource.Descriptor) async throws -> sending LowLevelMaterialResource
```

## Parameters

- `descriptor`: The geometry modifier, surface shader, and lighting function to compile into a material.

## Return Value

Return Value A newly compiled LowLevelMaterialResource.

## Discussion

Discussion note: An error if shader compilation fails.

## See Also

### Creating resources

- [makeBufferResource(descriptor:)](realitykit/lowlevelrendercontext/makebufferresource(descriptor:).md)
- [makeTextureResource(descriptor:)](realitykit/lowlevelrendercontext/maketextureresource(descriptor:).md)
- [makeMaterialResource(descriptor:)](realitykit/lowlevelrendercontext/makematerialresource(descriptor:)-8hizx.md)
