createDepthOfFieldStage

Creates a post-process stage that applies a depth of field effect.

Depth of field simulates camera focus. Objects in the scene that are in focus will be clear whereas objects not in focus will be blurred.

This stage has the following uniforms: focalDistance, delta, sigma, and stepSize.

focalDistance is the distance in meters from the camera to set the camera focus.

delta, sigma, and stepSize are the same properties as PostProcessStageLibrary.createBlurStage. The blur is applied to the areas out of focus.

Return

A post-process stage that applies a depth of field effect.

See also