SelectiveBloomEffect
Extends:
Indirect Implements:
A selective bloom effect.
This effect applies bloom only to selected objects by using layers. Make sure to enable the selection layer for all relevant lights:
lights.forEach((l) => l.layers.enable(bloomEffect.selection.layer));
Attention: If you don't need to limit bloom to a subset of objects, consider using the BloomEffect instead for better performance.
Constructor Summary
Public Constructor | ||
public |
constructor(scene: Scene, camera: Camera, options: Object) Constructs a new selective bloom effect. |
Member Summary
Public Members | ||
public get |
Indicates whether the scene background should be ignored. |
|
public set |
Enables or disables background rendering. |
|
public |
Indicates whether the selection should be considered inverted. |
|
public |
A selection of objects. |
Method Summary
Public Methods | ||
public |
initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) Performs initialization tasks. |
|
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. |
From class BloomEffect | ||
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 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. |
|
public |
A blur pass. |
|
public |
A luminance shader pass. |
|
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. |
Public Constructors
public constructor(scene: Scene, camera: Camera, options: Object) source
Constructs a new selective bloom effect.
Override:
BloomEffect#constructorParams:
Name | Type | Attribute | Description |
scene | Scene | The main scene. |
|
camera | Camera | The main camera. |
|
options | Object |
|
The options. See BloomEffect for details. |
Public Members
Public Methods
public initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) source
Performs initialization tasks.
Override:
BloomEffect#initializepublic setSize(width: Number, height: Number) source
Updates the size of internal render targets.
Override:
BloomEffect#setSizepublic update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number) source
Updates this effect.
Override:
BloomEffect#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. |