📄 threejs/Addons/TSL/TRAANode

File: TRAANode.md | Updated: 11/15/2025


title: TRAANode category: Addons layout: docs

TRAANode

A special node that applies TRAA (Temporal Reprojection Anti-Aliasing).

References:

Import

TRAANode is an addon, and must be imported explicitly, see Installation#Addons.

import { traa } from 'three/addons/tsl/display/TRAANode.js';

Constructor

new TRAANode( beautyNode : TextureNode, depthNode : TextureNode, velocityNode : TextureNode, camera : Camera )

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.

Properties

.beautyNode : TextureNode

The texture node that represents the input of the effect.

.camera : Camera

The camera the scene is rendered with.

.depthNode : TextureNode

A node that represents the scene's velocity.

.isTRAANode : boolean (readonly)

This flag can be used for type testing.

Default is true.

.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

.velocityNode : TextureNode

A node that represents the scene's velocity.

Methods

.clearViewOffset()

Clears the view offset from the scene's camera.

.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.

.setViewOffset( width : number, height : number )

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.

.setup( builder : NodeBuilder ) : PassTextureNode

This method is used to setup the effect's render targets and 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

Source

examples/jsm/tsl/display/TRAANode.js