---
title: "init(program:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/portalmaterial/init(program:)"
---

# init(program:)

Create a PortalMaterial with an already initialized Program. Use this method when you want to preload a library of shaders and create instances of them quickly and synchronously via PortalMaterial at runtime.

## Declaration

```swift
init(program: PortalMaterial.Program)
```
