Capítulo 419 de 859
Post processing node for creating a gaussian blur effect.
true if you are going to blur texture input with transparency.updateBeforeType is set to NodeUpdateType.FRAME since the node renders its effect once per frame in updateBefore().import { gaussianBlur, premultipliedGaussianBlur } from 'three/addons/tsl/display/GaussianBlurNode.js';
Constructor
| Signature |
|---|
| `new GaussianBlurNode( textureNode : TextureNode, directionNode : Node.<(vec2 |
Properties
| Property | Description |
|---|---|
| `.directionNode : Node.<(vec2 | float)>` |
.isGaussianBlurNode : boolean (readonly) | This flag can be used for type testing. |
.premultipliedAlpha : boolean | Whether the effect should use premultiplied alpha or not. Set this to true if you are going to blur texture input with transparency. |
.resolution : Vector2 | The resolution scale. |
.resolutionScale : number | The resolution scale. |
.sigma : number | Controls the kernel of the blur filter. Higher values mean a wider blur radius. |
.textureNode : TextureNode | The texture node that represents the input of the effect. |
.updateBeforeType : string | The updateBeforeType is set to NodeUpdateType.FRAME since the node renders its effect once per frame in updateBefore(). |
Methods
| Method | Description |
|---|---|
.dispose() | Frees internal resources. This method should be called when the effect is no longer required. |
.getTextureNode() : PassTextureNode | Returns the result of the effect as a texture node. |
.setSize( width : number, height : number ) | Sets the size of the effect. |
.setup( builder : NodeBuilder ) : PassTextureNode | This method is used to setup the effect's TSL code. |
.updateBefore( frame : NodeFrame ) | This method is used to render the effect once per frame. |