File: SSAARenderPass.md | Updated: 11/15/2025
Supersample Anti-Aliasing Render Pass.
This manual approach to SSAA re-renders the scene ones for each sample with camera jitter and accumulates the results.
const ssaaRenderPass = new SSAARenderPass( scene, camera );
ssaaRenderPass.sampleLevel = 3;
composer.addPass( ssaaRenderPass );
SSAARenderPass is an addon, and must be imported explicitly, see Installation#Addons.
import { SSAARenderPass } from 'three/addons/postprocessing/SSAARenderPass.js';
Constructs a new SSAA render pass.
scene | The scene to render.
---|---
camera | The camera.
clearColor | The clear color of the render pass. Default is 0x000000.
clearAlpha | The clear alpha of the render pass. Default is 0.
The camera.
The clear alpha of the render pass.
Default is 0.
The clear color of the render pass.
Default is 0x000000.
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.
The scene to render.
Whether to use a stencil buffer or not. This property can't be changed after the first render.
Default is false.
Whether the pass should be unbiased or not. This property has the most visible effect when rendering to a RGBA8 buffer because it mitigates rounding errors. By default RGBA16F is used.
Default is true.
Frees the GPU-related resources allocated by this instance. Call this method whenever the pass is no longer used in your app.
Overrides: Pass#dispose
Performs the SSAA render pass.
renderer | The renderer.
---|---
writeBuffer | The write buffer. This buffer is intended as the rendering destination for the pass.
readBuffer | The read buffer. The pass can access the result from the previous pass from this buffer.
deltaTime | The delta time in seconds.
maskActive | Whether masking is active or not.
Overrides: Pass#render
Sets the size of the pass.
width | The width to set.
---|---
height | The height to set.
Overrides: Pass#setSize