File: SSRNode.md | Updated: 11/15/2025
Post processing node for computing screen space reflections (SSR).
Reference: https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html
SSRNode is an addon, and must be imported explicitly, see Installation#Addons.
import { ssr } from 'three/addons/tsl/display/SSRNode.js';
Constructs a new SSR node.
colorNode | The node that represents the beauty pass.
---|---
depthNode | A node that represents the beauty pass's depth.
normalNode | A node that represents the beauty pass's normals.
metalnessNode | A node that represents the beauty pass's metalness.
roughnessNode | A node that represents the beauty pass's roughness. Default is null.
camera | The camera the scene is rendered with. Default is null.
The quality of the blur. Must be an integer in the range [1,3].
The camera the scene is rendered with.
The node that represents the beauty pass.
A node that represents the beauty pass's depth.
Controls how far a fragment can reflect. Increasing this value result in more computational overhead but also increases the reflection distance.
A node that represents the beauty pass's metalness.
A node that represents the beauty pass's normals.
Controls how the SSR reflections are blended with the beauty pass.
This parameter controls how detailed the raymarching process works. The value ranges is [0,1] where 1 means best quality (the maximum number of raymarching iterations/samples) and 0 means no samples at all.
A quality of 0.5 is usually sufficient for most use cases. Try to keep this parameter as low as possible. Larger values result in noticeable more overhead.
The resolution scale. Valid values are in the range [0,1]. 1 means best quality but also results in more computational overhead. Setting to 0.5 means the effect is computed in half-resolution.
Default is 1.
Controls the cutoff between what counts as a possible reflection hit and what does not.
The updateBeforeType is set to NodeUpdateType.FRAME since the node renders its effect once per frame in updateBefore().
Default is 'frame'.
Overrides: TempNode#updateBeforeType
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.
This method is used to setup the effect's 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