<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNNode/castsShadow",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNNode(py)castsShadow"
  },
  "title" : "castsShadow"
}
-->

# castsShadow

A Boolean value that determines whether SceneKit renders the node’s contents into shadow maps.

```
var castsShadow: Bool { get set }
```

## Discussion

SceneKit renders shadows by rendering a *shadow map* image containing silhouettes of the scene’s contents, and then projecting that image onto the scene. SceneKit performs this process once for each [`SCNLight`](/documentation/SceneKit/SCNLight) object in the scene whose [`castsShadow`](/documentation/SceneKit/SCNLight/castsShadow) property is <doc://com.apple.documentation/documentation/Swift/true>. Because shadow map rendering re-renders portions of the scene, it incurs a performance cost. To minimize this performance cost, exclude nodes from shadow map rendering by setting the node’s [`castsShadow`](/documentation/SceneKit/SCNNode/castsShadow) property to <doc://com.apple.documentation/documentation/Swift/false>.

For more details on shadow rendering, see [`SCNLight`](/documentation/SceneKit/SCNLight).

---

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)