---
title: "init(named:in:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/lowlevelmaterialresource/surfaceshader/descriptor/init(named:in:)"
---

# init(named:in:)

Creates a descriptor referencing the named function in the given library.

## Declaration

```swift
init(named name: String, in library: any MTLLibrary)
```

## Parameters

- `name`: The name of the Metal function in the library.
- `library`: The Metal library that contains the function.
