BloomEffect
Extends:
Direct Subclass:
Indirect Implements:
A bloom effect.
This effect uses the fast Kawase convolution technique and a luminance filter to blur bright highlights.
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object) Constructs a new bloom effect. |
Member Summary
Public Members | ||
public |
A blur pass. |
|
public get |
this get was deprecated. Use luminanceMaterial.threshold and luminanceMaterial.smoothing instead.
|
|
public set |
this set was deprecated. Use luminanceMaterial.threshold and luminanceMaterial.smoothing instead.
|
|
public get |
this get was deprecated. Set the frameBufferType of the EffectComposer to HalfFloatType instead.
Indicates whether dithering is enabled. |
|
public set |
this set was deprecated. Set the frameBufferType of the EffectComposer to HalfFloatType instead.
Enables or disables dithering. |
|
public get |
this get was deprecated. Use resolution.height instead.
The current height of the internal render targets. |
|
public set |
this set was deprecated. Use resolution.height instead.
Sets the render height. |
|
public get |
The bloom intensity. |
|
public set |
Sets the bloom intensity. |
|
public get |
this get was deprecated. Use blurPass.kernelSize instead.
The blur kernel size. |
|
public set |
this set was deprecated. Use blurPass.kernelSize instead.
|
|
public get |
The luminance material. |
|
public |
A luminance shader pass. |
|
public get |
The resolution of this effect. |
|
public get |
texture: Texture A texture that contains the intermediate result of this effect. |
|
public get |
this get was deprecated. Use resolution.width instead.
The current width of the internal render targets. |
|
public set |
this set was deprecated. Use resolution.width instead.
Sets the render width. |
Method Summary
Public Methods | ||
public |
this method was deprecated. Adjust the fixed resolution width or height instead.
Returns the current resolution scale. |
|
public |
initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) Performs initialization tasks. |
|
public |
setResolutionScale(scale: Number) this method was deprecated. Adjust the fixed resolution width or height instead.
Sets the resolution scale. |
|
public |
Updates the size of internal render targets. |
|
public |
Updates this effect. |
Inherited Summary
From class Effect | ||
public |
The blend mode of this effect. |
|
public |
Preprocessor macro definitions. |
|
public |
WebGL extensions that are required by this effect. |
|
public |
The name of this effect. |
|
public |
Shader uniforms. |
|
public |
dispose() Performs a shallow search for properties that define a dispose method and deletes them. |
|
public |
Returns the effect attributes. |
|
public |
Returns the fragment shader. |
|
public |
Returns the vertex shader. |
|
public |
initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) Performs initialization tasks. |
|
public |
setDepthTexture(depthTexture: Texture, depthPacking: Number) Sets the depth texture. |
|
public |
Updates the size of this effect. |
|
public |
Updates the effect by performing supporting operations. |
|
protected |
setAttributes(attributes: EffectAttribute) Sets the effect attributes. |
|
protected |
Informs the associated EffectPass that this effect has changed in a way that requires a shader recompilation. |
|
protected |
setFragmentShader(fragmentShader: String) Sets the fragment shader. |
|
protected |
setVertexShader(vertexShader: String) Sets the vertex shader. |
Public Constructors
public constructor(options: Object) source
Constructs a new bloom effect.
Override:
Effect#constructorParams:
Name | Type | Attribute | Description |
options | Object |
|
The options. |
options.blendFunction | BlendFunction |
|
The blend function of this effect. |
options.luminanceThreshold | Number |
|
The luminance threshold. Raise this value to mask out darker elements in the scene. Range is [0, 1]. |
options.luminanceSmoothing | Number |
|
Controls the smoothness of the luminance threshold. Range is [0, 1]. |
options.resolutionScale | Number |
|
Deprecated. Use height or width instead. |
options.intensity | Number |
|
The intensity. |
options.width | Number |
|
The render width. |
options.height | Number |
|
The render height. |
options.kernelSize | KernelSize |
|
The blur kernel size. |
Public Members
public get distinction: Number source
public set distinction: Number source
public get dithering: Boolean source
Indicates whether dithering is enabled.
public set dithering: Boolean source
Enables or disables dithering.
public get height: Number source
The current height of the internal render targets.
public set height: Number source
Sets the render height.
public get kernelSize: KernelSize source
The blur kernel size.
public luminancePass: ShaderPass source
A luminance shader pass.
You may disable this pass to deactivate luminance filtering.
public get texture: Texture source
A texture that contains the intermediate result of this effect.
This texture will be applied to the scene colors unless the blend function
is set to SKIP
.
Public Methods
public getResolutionScale(): Number source
Returns the current resolution scale.
public initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) source
Performs initialization tasks.
Override:
Effect#initializepublic setResolutionScale(scale: Number) source
Sets the resolution scale.
Params:
Name | Type | Attribute | Description |
scale | Number | The new resolution scale. |
public setSize(width: Number, height: Number) source
Updates the size of internal render targets.
Override:
Effect#setSizepublic update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number) source
Updates this effect.
Override:
Effect#updateParams:
Name | Type | Attribute | Description |
renderer | WebGLRenderer | The renderer. |
|
inputBuffer | WebGLRenderTarget | A frame buffer that contains the result of the previous pass. |
|
deltaTime | Number |
|
The time between the last frame and the current one in seconds. |