Inheritance: EventDispatcher → Node → TempNode →
A special node that applies TRAA (Temporal Reprojection Anti-Aliasing).
References:
TRAANode is an addon, and must be imported explicitly, see Installation#Addons.
import { traa } from 'three/addons/tsl/display/TRAANode.js';
Constructs a new TRAA node.
beautyNode
The texture node that represents the input of the effect.
depthNode
A node that represents the scene's depth.
velocityNode
A node that represents the scene's velocity.
camera
The camera the scene is rendered with.
The texture node that represents the input of the effect.
The camera the scene is rendered with.
A node that represents the scene's velocity.
When the difference between the current and previous depth goes above this threshold, the history is considered invalid.
Default is 0.0005.
The depth difference within the 3×3 neighborhood to consider a pixel as an edge.
Default is 0.001.
This flag can be used for type testing.
Default is true.
The history becomes invalid as the pixel length of the velocity approaches this value.
Default is 128.
The updateBeforeType is set to NodeUpdateType.FRAME since the node renders its effect once per frame in updateBefore().
Default is 'frame'.
Overrides: TempNode#updateBeforeType
Whether to decrease the weight on the current frame when the velocity is more subpixel. This reduces blurriness under motion, but can introduce a square pattern artifact.
Default is true.
A node that represents the scene's velocity.
Clears the view offset from the scene's camera.
Frees internal resources. This method should be called when the effect is no longer required.
Overrides: TempNode#dispose
Returns the result of the effect as a texture node.
Returns: A texture node that represents the result of the effect.
Sets the size of the effect.
width
The width of the effect.
height
The height of the effect.
Defines the TRAA's current jitter as a view offset to the scene's camera.
width
The width of the effect.
height
The height of the effect.
This method is used to setup the effect's render targets and TSL code.
builder
The current node builder.
Overrides: TempNode#setup
This method is used to render the effect once per frame.
frame
The current node frame.
Overrides: TempNode#updateBefore