Creates a single kernel object using a Metal Shading Language kernel function with optional pixel format.
- iOS 11.0+
- macOS 10.13+
- Mac Catalyst 13.0+Beta
- tvOS 11.0+
- Core Image
The name of the function in the Metal shading language.
A metallib file compiled with the Core Image Standard Library.
The pixel format of the output kernel.
This method allows you to use MSL as the shader language for a Core Image kernel. Since MSL based kernels are precompiled, initializing them is faster than their than Core Image Kernel Language (CIKL) counterparts and Xcode can provide error diagnostics during development rather than at runtime. MSL is a more modern language than CIKL, and you can write shader code that uses arrays, structs and matrices.
MSL based kernels still support concatenation and tiling and can work in the same filter graph as traditional CIKL kernels.