BokehMaterial
Extends:
Depth of Field shader (Bokeh).
Original shader code by Martins Upitis: http://artmartinsh.blogspot.com/2010/02/glsl-lens-blur-filter-with-bokeh.html
Constructor Summary
Public Constructor | ||
public |
constructor(camera: PerspectiveCamera, options: Object) Constructs a new bokeh material. |
Method Summary
Public Methods | ||
public |
adoptCameraSettings(camera: PerspectiveCamera) Adopts the settings of the given camera. |
Public Constructors
public constructor(camera: PerspectiveCamera, options: Object) source
Constructs a new bokeh material.
Params:
Name | Type | Attribute | Description |
camera | PerspectiveCamera |
|
A camera. |
options | Object |
|
The options. |
options.focus | Number |
|
The focus distance, corresponds directly with the scene depth. |
options.dof | Number |
|
Depth of field. An area in front of and behind the focus point that still appears sharp. |
options.aperture | Number |
|
Camera aperture scale. Bigger values for stronger blur and shallower depth of field. |
options.maxBlur | Number |
|
Maximum blur strength. |
Public Methods
public adoptCameraSettings(camera: PerspectiveCamera) source
Adopts the settings of the given camera.
Params:
Name | Type | Attribute | Description |
camera | PerspectiveCamera |
|
A camera. |