<!--
{
  "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/SKSpriteNode/lightingBitMask",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKSpriteNode(py)lightingBitMask"
  },
  "title" : "lightingBitMask"
}
-->

# lightingBitMask

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

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

## Discussion

To determine whether this sprite is lit by a light node, the sprite’s [`lightingBitMask`](/documentation/SpriteKit/SKSpriteNode/lightingBitMask) property is tested against the light’s <doc://com.apple.documentation/documentation/SceneKit/SCNLight/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).

---

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)