Bokeh2Material
Extends:
Depth of Field shader version 2.4.
Original shader code by Martins Upitis: http://blenderartists.org/forum/showthread.php?237488-GLSL-depth-of-field-with-bokeh-v2-4-(update)
Constructor Summary
Public Constructor | ||
public |
constructor(camera: PerspectiveCamera, options: Object) Constructs a new bokeh2 material. |
Method Summary
Public Methods | ||
public |
adoptCameraSettings(camera: PerspectiveCamera) Adopts the near and far plane and the focal length of the given camera. |
|
public |
setTexelSize(x: Number, y: Number) Sets the texel size. |
Public Constructors
public constructor(camera: PerspectiveCamera, options: Object) source
Constructs a new bokeh2 material.
Params:
Name | Type | Attribute | Description |
camera | PerspectiveCamera |
|
The main camera. |
options | Object |
|
Additional options. |
options.texelSize | Vector2 |
|
The absolute screen texel size. |
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 Methods
public adoptCameraSettings(camera: PerspectiveCamera) source
Adopts the near and far plane and the focal length of the given camera.
Params:
Name | Type | Attribute | Description |
camera | PerspectiveCamera | The main camera. |