---
title: library
framework: scenekit
role: symbol
role_heading: Instance Property
path: scenekit/scnprogram/library
---

# library

The Metal shader library containing shader functions to be used by this program.

## Declaration

```swift
var library: (any MTLLibrary)? { get set }
```

## Discussion

Discussion If this property’s value is nil (the default), SceneKit loads shader functions from the default Metal library. Change this value if you have compiled a separate .metallib file for the shader functions you wish to use.

## See Also

### Related Documentation

- [makeDefaultLibrary()](metal/mtldevice/makedefaultlibrary().md)

### Working With Metal Shaders

- [vertexFunctionName](scenekit/scnprogram/vertexfunctionname.md)
- [fragmentFunctionName](scenekit/scnprogram/fragmentfunctionname.md)
