A text file that defines code that does custom per-pixel drawing or colorization.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The default value is
nil, which means the default behavior for sprite rendering is performed. SpriteKit implements many sprite features using a default shader, such as:
If you supply a custom value for
shader, your custom shader overrides the default shader which neutralizes the default features. It is the responsibility of your custom shader to implement any of the features your sprites require.