Bokeh2Pass
Extends:
An advanced Depth of Field (DoF) pass.
Yields more realistic results but is also more demanding.
This pass requires a EffectComposer#depthTexture.
Constructor Summary
Public Constructor | ||
public |
constructor(camera: PerspectiveCamera, options: Object) Constructs a new bokeh2 pass. |
Member Summary
Public Members | ||
public |
The name of this pass. |
|
public |
This pass renders to the write buffer. |
Private Members | ||
private |
A bokeh shader material. |
Method Summary
Public Methods | ||
public |
render(renderer: WebGLRenderer, readBuffer: WebGLRenderTarget, writeBuffer: WebGLRenderTarget) Renders the effect. |
|
public |
Updates this pass with the renderer's size. |
Inherited Summary
From class Pass | ||
public |
[key]: * |
|
public |
Enabled flag. |
|
public |
The name of this pass. |
|
public |
Indicates whether the read and write buffers should be swapped after this pass has finished rendering. |
|
public |
Render to screen flag. |
|
protected |
camera: Camera The camera. |
|
protected |
quad: Mesh A quad mesh that fills the screen. |
|
protected |
scene: Scene The scene to render. |
|
public |
dispose() Performs a shallow search for properties that define a dispose method and deletes them. |
|
public |
initialise(renderer: WebGLRenderer, alpha: Boolean) Performs initialisation tasks. |
|
public abstract |
render(renderer: WebGLRenderer, readBuffer: WebGLRenderTarget, writeBuffer: WebGLRenderTarget, delta: Number, maskActive: Boolean) Renders the effect. |
|
public |
Updates this pass with the renderer's size. You may override this method in case you want to be informed about the main render size. The EffectComposer calls this method before this pass is initialised and every time its own size is updated. |
Public Constructors
public constructor(camera: PerspectiveCamera, options: Object) source
Constructs a new bokeh2 pass.
Override:
Pass#constructorParams:
Name | Type | Attribute | Description |
camera | PerspectiveCamera | The main camera. Used to obtain the focal length and the near and far plane settings. |
|
options | Object |
|
Additional parameters. |
options.rings | Number |
|
The amount of blur rings. |
options.samples | Number |
|
The amount of samples per ring. |
options.showFocus | Boolean |
|
Whether the focus point should be highlighted. |
options.manualDoF | Boolean |
|
Enables manual depth of field blur. |
options.vignette | Boolean |
|
Enables a vignette effect. |
options.pentagon | Boolean |
|
Enable to use a pentagonal shape to scale gathered texels. |
options.shaderFocus | Boolean |
|
Disable if you compute your own focalDepth (in metres!). |
options.noise | Boolean |
|
Disable if you don't want noise patterns for dithering. |
Public Members
Private Members
Public Methods
public render(renderer: WebGLRenderer, readBuffer: WebGLRenderTarget, writeBuffer: WebGLRenderTarget) source
Renders the effect.
Override:
Pass#renderParams:
Name | Type | Attribute | Description |
renderer | WebGLRenderer | The renderer. |
|
readBuffer | WebGLRenderTarget | The read buffer. |
|
writeBuffer | WebGLRenderTarget | The write buffer. |