---
title: "init(descriptor:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/shadergraphmaterial/program-swift.struct/init(descriptor:)"
---

# init(descriptor:)

Creates a program by compiling the shader node graph in the given descriptor.

## Declaration

```swift
init(descriptor: ShaderGraphMaterial.Program.Descriptor) async throws
```

## Discussion

Discussion note: If the graph is invalid or shader compilation fails.
