Constructs a new depth of field effect.
Optional camera: CameraThe main camera.
Optional options: { The options.
Optional blendThe blend function of this effect.
Optional bokehThe scale of the bokeh blur.
Optional focalThe focal length. Range is [0.0, 1.0].
Optional focusThe normalized focus distance. Range is [0.0, 1.0].
Optional focusThe focus range. Range is [0.0, 1.0].
Optional height?: numberDeprecated. Use resolutionY instead.
Optional resolutionThe resolution scale.
Optional resolutionX?: numberThe horizontal resolution.
Optional resolutionY?: numberThe vertical resolution.
Optional width?: numberDeprecated. Use resolutionX instead.
Optional worldThe focus distance in world units.
Optional worldThe focus distance in world units.
Readonly blendThe blend mode of this effect.
Readonly blurThis pass blurs the foreground CoC buffer to soften edges.
Readonly definesPreprocessor macro definitions.
Call Effect.setChanged after changing macro definitions.
Readonly extensionsWebGL extensions that are required by this effect.
Call Effect.setChanged after adding or removing extensions.
The name of this effect.
Protected rendererThe renderer.
A target position that should be kept in focus. Set to null to disable auto focus.
Readonly uniformsShader uniforms.
Call Effect.setChanged after adding or removing uniforms.
The current bokeh scale.
The circle of confusion material.
Use cocMaterial instead.
The circle of confusion material.
The circle of confusion texture.
Experimental The input color space.
Protected Experimental Sets the main camera.
Sets the main scene.
The mask function. Default is MULTIPLY_RGB.
Experimental The output color space.
Should only be changed if this effect converts the input colors to a different color space.
Protected Experimental The resolution of this effect.
Performs a shallow search for properties that define a dispose method and deletes them.
The EffectComposer calls this method when it is being destroyed.
Returns the effect attributes.
The attributes.
Returns the pass that blurs the foreground CoC buffer to soften edges.
The blur pass.
Use blurPass instead.
Protected setProtected Sets the effect attributes.
Effects that have the same attributes will be executed in the order in which they were registered. Some attributes imply a higher priority.
The attributes.
Protected setProtected Informs the associated EffectPass that this effect requires a shader recompilation.
Should be called after changing macros or extensions and after adding/removing uniforms.
Sets the depth texture.
You may override this method if your effect requires direct access to the depth texture that is bound to the associated EffectPass.
A depth texture.
Optional depthPacking: DepthPackingStrategiesThe depth packing.
Protected setProtected setUpdates this effect.
The renderer.
A frame buffer that contains the result of the previous pass.
Optional deltaTime: numberThe time between the last frame and the current one in seconds.
A depth of field effect.
Based on a graphics study by Adrian Courrèges and an article by Steve Avery: https://www.adriancourreges.com/blog/2016/09/09/doom-2016-graphics-study/ https://pixelmischiefblog.wordpress.com/2016/11/25/bokeh-depth-of-field/