Import
RenderPass is an addon, and must be imported explicitly, see Installation#Addons.
import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
Constructor
new RenderPass( scene : Scene, camera : Camera, overrideMaterial : Material, clearColor : number | Color | string, clearAlpha : number )
Constructs a new render pass.
| scene |
The scene to render. |
| camera |
The camera. |
| overrideMaterial |
The override material. If set, this material is used for all objects in the scene. Default is |
| clearColor |
The clear color of the render pass. Default is |
| clearAlpha |
The clear alpha of the render pass. Default is |
Properties
.clear : boolean
Overwritten to perform a clear operation by default.
Default is true.
- Overrides: Pass#clear
.clearAlpha : number
The clear alpha of the render pass.
Default is null.
.clearColor : number | Color | string
The clear color of the render pass.
Default is null.
.clearDepth : boolean
If set to true, only the depth can be cleared when clear is to false.
Default is false.
.isRenderPass : boolean (readonly)
This flag indicates that this pass renders the scene itself.
Default is true.
.overrideMaterial : Material
The override material. If set, this material is used for all objects in the scene.
Default is null.
Methods
.render( renderer : WebGLRenderer, writeBuffer : WebGLRenderTarget, readBuffer : WebGLRenderTarget, deltaTime : number, maskActive : boolean )
Performs a beauty pass with the configured scene and camera.
| 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