Instance Property

castsShadow

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

Declaration

@property(nonatomic) BOOL castsShadow;

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 object in the scene whose castsShadow property is YES. 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 property to NO.

For more details on shadow rendering, see SCNLight.

See Also

Modifying the Node Visibility

hidden

A Boolean value that determines the visibility of the node’s contents. Animatable.

opacity

The opacity value of the node. Animatable.

renderingOrder

The order the node’s content is drawn in relative to that of other nodes.

movabilityHint

A value that indicates how SceneKit should handle the node when rendering movement-related effects.

SCNMovabilityHint

Values that inform SceneKit’s rendering for movement-related effects, used by the movabilityHint property.