Inheritance: Pass →
A pass for rendering outlines around selected objects.
const resolution = new THREE.Vector2( window.innerWidth, window.innerHeight );
const outlinePass = new OutlinePass( resolution, scene, camera );
composer.addPass( outlinePass );
OutlinePass is an addon, and must be imported explicitly, see Installation#Addons.
import { OutlinePass } from 'three/addons/postprocessing/OutlinePass.js';
Constructs a new outline pass.
resolution
The effect's resolution.
scene
The scene to render.
camera
The camera.
selectedObjects
The selected 3D objects that should receive an outline.
The downsample ratio. The effect can be rendered in a much lower resolution than the beauty pass.
Default is 2.
Can be used for an animated glow/pulse effect.
Default is 0.
The edge strength.
Default is 3.
The edge thickness.
Default is 1.
The hidden edge color.
Default is (0.1,0.04,0.02).
Can be used to highlight selected 3D objects. Requires to set OutlinePass#usePatternTexture to true.
Default is null.
The pulse period.
Default is 0.
The camera.
The scene to render.
The effect's resolution.
Default is (256,256).
The selected 3D objects that should receive an outline.
Whether to use a pattern texture for to highlight selected 3D objects or not.
Default is false.
The visible edge color.
Default is (1,1,1).
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 Outline 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