<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKShapeNode/fillShader",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKShapeNode(py)fillShader"
  },
  "title" : "fillShader"
}
-->

# fillShader

A custom shader used to determine the color of the filled portion of the shape node.

```
var fillShader: SKShader? { get set }
```

## Discussion

The default value is `nil`. If a `fillShader` 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:

- Fill color.
- Animations on [`alpha`](/documentation/SpriteKit/SKNode/alpha).
- Light cast by [`SKLightNode`](/documentation/SpriteKit/SKLightNode).

If you supply a custom value for `fillShader`, 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)