---
title: "init(materialXLabel:data:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/shadergraphmaterial/init(materialxlabel:data:)"
---

# init(materialXLabel:data:)

Loads a ShaderGraphMaterial from MaterialX data.

## Declaration

```swift
init(materialXLabel: String, data: Data) async throws
```

## Parameters

- `materialXLabel`: The name of the ShaderGraphMaterial in the MaterialX data.
- `data`: The data containing the MaterialX file contents.

## Return Value

Return Value A ShaderGraphMaterial object from the data with the label specified.
