Instance Property

zFar

The maximum distance between the light and a visible surface for casting shadows.

Declaration

@property(nonatomic) CGFloat zFar;

Discussion

A spotlight casts shadows if its castsShadow property is YES. If a surface is farther from the light than this distance, shadows are not cast against the surface.

The default value is 100.0.

You can animate changes to this property’s value. See Animating SceneKit Content.

See Also

Managing Shadows Cast by the Light

castsShadow

A Boolean value that determines whether the light casts shadows.

shadowRadius

A number that specifies the amount of blurring around the edges of shadows cast by the light. Animatable.

shadowColor

The color of shadows cast by the light. Animatable.

shadowMapSize

The size of the shadow map image that SceneKit renders when creating shadows.

shadowSampleCount

The number of samples from the shadow map that SceneKit uses to render each pixel.

shadowMode

The mode SceneKit uses to render shadows.

SCNShadowMode

Options for SceneKit’s rendering of shadows cast by a light, used by the shadowMode property.

shadowBias

The amount of correction to apply to the shadow to prevent rendering artifacts.

orthographicScale

The orthographic scale SceneKit uses when rendering the shadow map for a directional light.

zNear

The minimum distance between the light and a visible surface for casting shadows. Animatable.