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

# shadowCastBitMask

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

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

## Discussion

To determine whether this sprite blocks the light (casting a shadow), the sprite’s [`shadowedBitMask`](/documentation/SpriteKit/SKSpriteNode/shadowedBitMask) 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 casts a shadow past itself.

---

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)