A custom shader used to determine the color of the filled portion of the shape node.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The default value is
nil. If a
fill is specified, when the shape node is drawn, the shader is used to determine the output colors for any part of the shape node that's fillled. SpriteKit implements many fill features using a default shader, such as:
If you supply a custom value for
fill, your custom shader overrides the default shader which neutralizes the default features. It is the responsibility of your custom fillShader to implement any of the features your shape requires.