Instance Property

wantsDepthOfField

A Boolean value that determines whether SceneKit renders depth-of-field blur effects for the camera.

Declaration

@property(nonatomic) BOOL wantsDepthOfField;

Discussion

This value is NO by default, disabling depth-of-field effects.

Enabling this property causes SceneKit to render blur effects that model those created by a physical camera device (also known as bokeh). That is, objects in the scene appear more or less blurry depending on their distance from the camera and the camera's focusDistance, and the intensity and style of the blur effect depend on the fStop and apertureBladeCount properties.

See Also

Adding Depth-of-Field Effects

focusDistance

The distance from the camera at which objects appear in sharp focus. Animatable.

fStop

The physical camera aperture simulated by SceneKit for depth-of-field effects. Animatable.

apertureBladeCount

The number of physical camera aperture blades simulated by SceneKit for depth-of-field effects.

focalBlurSampleCount

The number of pixel samples SceneKit uses to create depth-of-field blur effects.