---
title: shadowCastBitMask
framework: spritekit
role: symbol
role_heading: Instance Property
path: spritekit/skspritenode/shadowcastbitmask
---

# shadowCastBitMask

A mask that defines which lights are occluded by this sprite.

## Declaration

```swift
var shadowCastBitMask: UInt32 { get set }
```

## Mentioned in

Lighting a Sprite with Light Nodes

## Discussion

Discussion To determine whether this sprite blocks the light (casting a shadow), the sprite’s shadowedBitMask property is tested against the light’s categoryBitMask property by performing a logical AND operation. If the comparison results in a nonzero value, the sprite casts a shadow past itself.

## See Also

### Lighting a Sprite

- [Lighting a Sprite with Light Nodes](spritekit/lighting-a-sprite-with-light-nodes.md)
- [lightingBitMask](spritekit/skspritenode/lightingbitmask.md)
- [shadowedBitMask](spritekit/skspritenode/shadowedbitmask.md)
- [normalTexture](spritekit/skspritenode/normaltexture.md)
