Import
BloomNode is an addon, and must be imported explicitly, see Installation#Addons.
import { bloom } from 'three/addons/tsl/display/BloomNode.js';
Constructor
new BloomNode( inputNode : Node.<vec4>, strength : number, radius : number, threshold : number )
Constructs a new bloom node.
| inputNode |
The node that represents the input of the effect. |
| strength |
The strength of the bloom. Default is |
| radius |
The radius of the bloom. Default is |
| threshold |
The luminance threshold limits which bright areas contribute to the bloom effect. Default is |
Properties
.radius : UniformNode.<float>
The radius of the bloom. Must be in the range [0,1].
.smoothWidth : UniformNode.<float>
Can be used to tweak the extracted luminance from the scene.
.strength : UniformNode.<float>
The strength of the bloom.
.threshold : UniformNode.<float>
The luminance threshold limits which bright areas contribute to the bloom effect.
.updateBeforeType : string
The updateBeforeType is set to NodeUpdateType.FRAME since the node renders
its effect once per frame in updateBefore().
Default is 'frame'.
- Overrides: TempNode#updateBeforeType
Methods
.dispose()
Frees internal resources. This method should be called when the effect is no longer required.
- Overrides: TempNode#dispose
.getTextureNode() : PassTextureNode
Returns the result of the effect as a texture node.
- Returns: A texture node that represents the result of the effect.
.setSize( width : number, height : number )
Sets the size of the effect.
| width |
The width of the effect. |
| height |
The height of the effect. |
.setup( builder : NodeBuilder ) : PassTextureNode
This method is used to setup the effect's TSL code.
| builder |
The current node builder. |
- Overrides: TempNode#setup
.updateBefore( frame : NodeFrame )
This method is used to render the effect once per frame.
| frame |
The current node frame. |
- Overrides: TempNode#updateBefore