📄 threejs/Addons/Postprocessing/SavePass

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


title: SavePass category: Addons layout: docs

SavePass

A pass that saves the contents of the current read buffer in a render target.

Code Example

const savePass = new SavePass( customRenderTarget );
composer.addPass( savePass );

Import

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

import { SavePass } from 'three/addons/postprocessing/SavePass.js';

Constructor

new SavePass( renderTarget : WebGLRenderTarget )

Constructs a new save pass.

renderTarget | The render target for saving the read buffer. If not provided, the pass automatically creates a render target.
---|---

Properties

.material : ShaderMaterial

The pass material.

.needsSwap : boolean

Overwritten to disable the swap.

Default is false.

Overrides: Pass#needsSwap

.renderTarget : WebGLRenderTarget

The render target which is used to save the read buffer.

.uniforms : Object

The pass uniforms.

Methods

.dispose()

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

.render( renderer : WebGLRenderer, writeBuffer : WebGLRenderTarget, readBuffer : WebGLRenderTarget, deltaTime : number, maskActive : boolean )

Performs the save 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

.setSize( width : number, height : number )

Sets the size of the pass.

width | The width to set.
---|---
height | The height to set.

Overrides: Pass#setSize

Source

examples/jsm/postprocessing/SavePass.js