File: SSAAPassNode.md | Updated: 11/15/2025
A special render pass node that renders the scene with SSAA (Supersampling Anti-Aliasing). This manual SSAA approach re-renders the scene ones for each sample with camera jitter and accumulates the results.
This node produces a high-quality anti-aliased output but is also extremely expensive because of its brute-force approach of re-rendering the entire scene multiple times.
Reference: https://en.wikipedia.org/wiki/Supersampling
SSAAPassNode is an addon, and must be imported explicitly, see Installation#Addons.
import { ssaaPass } from 'three/addons/tsl/display/SSAAPassNode.js';
Constructs a new SSAA pass node.
scene | The scene to render.
---|---
camera | The camera to render the scene with.
The clear alpha of the pass.
Default is 0.
The clear color of the pass.
Default is 0x000000.
This flag can be used for type testing.
Default is true.
The sample level specified as n, where the number of samples is 2^n, so sampleLevel = 4, is 2^4 samples, 16.
Default is 4.
A uniform node representing the sample weight.
Default is 1.
Whether rounding errors should be mitigated or not.
Default is true.
Frees internal resources. This method should be called when the pass is no longer required.
Overrides: PassNode#dispose
This method is used to setup the effect's MRT configuration and quad mesh.
builder | The current node builder.
---|---
Overrides: PassNode#setup
This method is used to render the SSAA effect once per frame.
frame | The current node frame.
---|---
Overrides: PassNode#updateBefore