Interface DepthOfFieldPostProcessTaskConfig
interface DepthOfFieldPostProcessTaskConfig {
alphaMode?: PostProcessAlphaMode;
blurLevel?: DepthOfFieldBlurLevel;
camera: Camera;
clear?: boolean;
depthNotNormalized?: boolean;
depthTexture: RenderTarget;
focalLength?: number;
focusDistance?: number;
fStop?: number;
lensSize?: number;
name?: string;
sourceSamplingMode?: PostProcessSamplingMode;
sourceTexture: RenderTarget;
targetTexture?: RenderTarget | null;
viewport?: NormalizedViewport | null;
}
alphaMode?: PostProcessAlphaMode;
blurLevel?: DepthOfFieldBlurLevel;
camera: Camera;
clear?: boolean;
depthNotNormalized?: boolean;
depthTexture: RenderTarget;
focalLength?: number;
focusDistance?: number;
fStop?: number;
lensSize?: number;
name?: string;
sourceSamplingMode?: PostProcessSamplingMode;
sourceTexture: RenderTarget;
targetTexture?: RenderTarget | null;
viewport?: NormalizedViewport | null;
}
Hierarchy (View Summary)
- PostProcessTaskSettings
- DepthOfFieldPostProcessTaskConfig
Properties
Optionalalpha Mode
Optionalblur Level
Blur quality. Default DepthOfFieldBlurLevel.Low.
camera
Camera used to read minZ/maxZ when the depth is normalized.
Optionalclear
clear?: boolean
Clear the target before drawing. Set false when several viewport passes share a target.
Optionaldepth Not Normalized
depthNotNormalized?: boolean
When true the depth texture stores camera-space depth (0..maxZ).
depth Texture
Depth texture. With depthNotNormalized it stores camera-space (view)
depth; otherwise normalized [0,1] view depth.
Optionalfocal Length
focalLength?: number
Focal length of the camera in scene units / 1000. Default 50.
Optionalfocus Distance
focusDistance?: number
Distance from the camera to focus on, in scene units / 1000. Default 2000.
Optionalf Stop
fStop?: number
F-Stop of the camera. Default 1.4.
Optionallens Size
lensSize?: number
Max lens size in scene units / 1000. Default 50.
Optionalname
name?: string
Configuration for
createDepthOfFieldPostProcessTask.Models Babylon.js's
FrameGraphDepthOfFieldTask+ThinDepthOfFieldEffect: a circle-of-confusion pass feeds a stack of CoC-weighted separable blurs, which are merged back over the sharp image for a physically-plausible depth-of-field effect.