Function createDepthOfFieldPostProcessTask
-
createDepthOfFieldPostProcessTask(
config: DepthOfFieldPostProcessTaskConfig,
engine: EngineContext,
scene?: SceneContext,
): DepthOfFieldPostProcessTaskParameters
- config: DepthOfFieldPostProcessTaskConfig
Source/depth textures, camera, lens parameters, blur level, and target settings.
- engine: EngineContext
The owning engine.
Optionalscene: SceneContextOptional owning scene. Omit for scene-less standalone frame graphs.
Returns DepthOfFieldPostProcessTask
The depth-of-field post-process task.
- config: DepthOfFieldPostProcessTaskConfig
Create a depth-of-field post-process task. The source image is first reduced to a circle-of-confusion map (from the depth texture + lens parameters), then blurred at one to three decreasing resolutions with CoC-weighted blurs, and finally merged so each pixel transitions smoothly from sharp to blurred based on how far out of focus it is.