Returns an object representing a shader function in the library.
- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
The name of the function.
nil if the named function is not found in the library.
If you call this method to retrieve a function that does not use function constants, it returns a
MTLFunction object that you can use to build a render or compute pipeline.
If you call this method to retrieve a function that uses function constants to specialize its behavior, the returned function can be used only to query the functionConstants property for the list of function constants. It cannot be used to build a render or compute pipeline. To get a specialized object that can be used to create a pipeline object, call the
new method or
new to generate a specialized function.