BloomPass
Extends:
Indirect Implements:
A bloom pass.
This pass renders a scene with superimposed blur by utilizing the fast Kawase convolution approach.
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object) Constructs a new bloom pass. |
Member Summary
Public Members | ||
public get |
Indicates whether the effect should be applied to the input buffer. |
|
public set |
If disabled, the input buffer will remain unaffected. |
|
public get |
The luminance distinction factor. |
|
public set |
|
|
public set |
If enabled, the result will be dithered to remove banding artifacts. |
|
public get |
Indicates whether dithering is enabled. |
|
public get |
The overall intensity of the effect. |
|
public set |
|
|
public get |
The blur kernel size. |
|
public set |
|
|
public |
needsSwap: * |
|
public get |
overlay: Texture The effect overlay texture. |
|
public get |
this get was deprecated. Use getResolutionScale() instead.
The resolution scale. |
|
public set |
this set was deprecated. Use setResolutionScale(Number) instead.
|
Private Members | ||
private |
A blur pass. |
|
private |
A combine shader material. |
|
private |
A luminosity shader material. |
|
private |
renderTarget: WebGLRenderTarget A render target. |
|
private |
resolution: Vector2 The original resolution. |
Method Summary
Public Methods | ||
public |
Returns the current resolution scale. |
|
public |
initialize(renderer: WebGLRenderer, alpha: Boolean) Performs initialization tasks. |
|
public |
render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, outputBuffer: WebGLRenderTarget, delta: Number, stencilTest: Boolean) Renders the effect. |
|
public |
setResolutionScale(scale: Number) Sets the resolution scale. |
|
public |
Updates the size of this pass. |
Inherited Summary
From class Pass | ||
public get |
material: Material this get was deprecated. Use getFullscreenMaterial() instead.
The fullscreen material. |
|
protected set |
material: Material this set was deprecated. Use setFullscreenMaterial(Material) instead.
|
|
public |
[key]: * |
|
public |
Indicates whether this pass should be executed. |
|
public |
The name of this pass. |
|
public |
Indicates whether the EffectComposer should swap the frame buffers after this pass has finished rendering. |
|
public |
Indicates whether this pass should render to screen. |
|
protected |
camera: Camera The camera. |
|
protected |
scene: Scene The scene to render. |
|
private |
quad: Mesh A quad mesh that fills the screen. |
|
public |
dispose() Performs a shallow search for disposable properties and deletes them. |
|
public |
getFullscreenMaterial(): Material Returns the current fullscreen material. |
|
public |
initialize(renderer: WebGLRenderer, alpha: Boolean) Performs initialization tasks. |
|
public abstract |
render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, outputBuffer: WebGLRenderTarget, delta: Number, stencilTest: 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 initialized and every time its own size is updated. |
|
protected |
setFullscreenMaterial(material: Material) Sets the fullscreen material. |
Public Constructors
public constructor(options: Object) source
Constructs a new bloom pass.
Override:
Pass#constructorParams:
Name | Type | Attribute | Description |
options | Object |
|
The options. |
options.resolutionScale | Number |
|
The render texture resolution scale, relative to the screen render size. |
options.kernelSize | Number |
|
The blur kernel size. |
options.intensity | Number |
|
The strength of the bloom effect. |
options.distinction | Number |
|
The luminance distinction factor. Raise this value to bring out the brighter elements in the scene. |
options.screenMode | Number |
|
Whether the screen blend mode should be used for combining the bloom texture with the scene colors. |
Public Members
public get blend: Boolean source
Indicates whether the effect should be applied to the input buffer.
public set blend: Boolean source
If disabled, the input buffer will remain unaffected.
You may use the BloomPass#overlay texture to apply the effect to your scene.
public set dithering: Boolean source
If enabled, the result will be dithered to remove banding artifacts.
public set kernelSize: KernelSize source
public needsSwap: * source
Indicates whether the EffectComposer should swap the frame buffers after this pass has finished rendering.
Set this to false
if this pass doesn't render to the output buffer or
the screen. Otherwise, the contents of the input buffer will be lost.
Override:
Pass#needsSwappublic get resolutionScale: Number source
The resolution scale.
public set resolutionScale: Number source
Private Members
Public Methods
public initialize(renderer: WebGLRenderer, alpha: Boolean) source
Performs initialization tasks.
Override:
Pass#initializeParams:
Name | Type | Attribute | Description |
renderer | WebGLRenderer | The renderer. |
|
alpha | Boolean | Whether the renderer uses the alpha channel or not. |
public render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, outputBuffer: WebGLRenderTarget, delta: Number, stencilTest: Boolean) source
Renders the effect.
Override:
Pass#renderParams:
Name | Type | Attribute | Description |
renderer | WebGLRenderer | The renderer. |
|
inputBuffer | WebGLRenderTarget | A frame buffer that contains the result of the previous pass. |
|
outputBuffer | WebGLRenderTarget | A frame buffer that serves as the output render target unless this pass renders to screen. |
|
delta | Number |
|
The time between the last frame and the current one in seconds. |
stencilTest | Boolean |
|
Indicates whether a stencil mask is active. |