---
title: fillShader
framework: spritekit
role: symbol
role_heading: Instance Property
path: spritekit/skshapenode/fillshader
---

# fillShader

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

## Declaration

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

## Mentioned in

Controlling Shape Drawing with Shaders

## Discussion

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. Light cast by 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.

## See Also

### Customizing Stroking or Fill Drawing

- [Controlling Shape Drawing with Shaders](spritekit/controlling-shape-drawing-with-shaders.md)
- [strokeShader](spritekit/skshapenode/strokeshader.md)
- [attributeValues](spritekit/skshapenode/attributevalues.md)
- [setValue(_:forAttribute:)](spritekit/skshapenode/setvalue(_:forattribute:).md)
- [value(forAttributeNamed:)](spritekit/skshapenode/value(forattributenamed:).md)
