---
title: lightingBitMask
framework: spritekit
role: symbol
role_heading: Instance Property
path: spritekit/skspritenode/lightingbitmask
---

# lightingBitMask

A mask that defines how this sprite is lit by light nodes in the scene.

## Declaration

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

## Mentioned in

Lighting a Sprite with Light Nodes

## Discussion

Discussion To determine whether this sprite is lit by a light node, the sprite’s lightingBitMask 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 is lit by this light. The default value is 0x00000000 (all bits cleared).

## See Also

### Lighting a Sprite

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