📄 threejs/Addons/Effects/ParallaxBarrierEffect

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


title: ParallaxBarrierEffect category: Addons layout: docs

ParallaxBarrierEffect

A class that creates an parallax barrier effect.

Note that this class can only be used with WebGLRenderer. When using WebGPURenderer, use ParallaxBarrierPassNode.

Import

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

import { ParallaxBarrierEffect } from 'three/addons/effects/ParallaxBarrierEffect.js';

Constructor

new ParallaxBarrierEffect( renderer : WebGLRenderer )

Constructs a new parallax barrier effect.

renderer | The renderer.
---|---

Methods

.dispose()

Frees internal resources. This method should be called when the effect is no longer required.

.render( scene : Object3D, camera : Camera )

When using this effect, this method should be called instead of the default WebGLRenderer#render.

scene | The scene to render.
---|---
camera | The camera.

.setSize( width : number, height : number )

Resizes the effect.

width | The width of the effect in logical pixels.
---|---
height | The height of the effect in logical pixels.

Source

examples/jsm/effects/ParallaxBarrierEffect.js