Home Reference Source
import {RenderPass} from 'postprocessing'
public class | source

RenderPass

Extends:

Pass → RenderPass

Indirect Implements:

A pass that renders a given scene into the input buffer or to screen.

This pass uses a ClearPass to clear the target buffer.

Constructor Summary

Public Constructor
public

constructor(scene: Scene, camera: Camera, overrideMaterial: Material)

Constructs a new render pass.

Member Summary

Public Members
public

camera: *

public get
this get was deprecated. Use clearPass.enabled instead.

Indicates whether the target buffer should be cleared before rendering.

public set
public

A clear pass.

public

Indicates whether the scene background should be ignored.

public set
public set
public
public get

overrideMaterial: Material

The current override material.

public set
public get
public set
public

scene: *

public

A selection of objects to render.

public

Indicates whether the shadow map auto update should be skipped.

Method Summary

Public Methods
public
this method was deprecated. Use clearPass.enabled instead.

Returns the clear pass.

public

getOverrideMaterial(): Material

this method was deprecated. Use overrideMaterial instead.

Returns the current override material.

public
this method was deprecated. Use selection instead.

Returns the selection.

public
this method was deprecated. Use ignoreBackground instead.

Indicates whether the scene background is disabled.

public
this method was deprecated. Use skipShadowMapUpdate instead.

Indicates whether the shadow map auto update is disabled.

public

render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, outputBuffer: WebGLRenderTarget, deltaTime: Number, stencilTest: Boolean)

Renders the scene.

public
this method was deprecated. Use ignoreBackground instead.

Enables or disables the scene background.

public

setOverrideMaterial(value: *): Material

this method was deprecated. Use overrideMaterial instead.

Sets the override material.

public
this method was deprecated. Use selection instead.

Sets the selection.

public
this method was deprecated. Use skipShadowMapUpdate instead.

Enables or disables the shadow map auto update.

Inherited Summary

From class Pass
public static get

fullscreenGeometry: BufferGeometry

A shared fullscreen triangle.

public get

fullscreenMaterial: Material

The fullscreen material.

public set
public set

mainCamera: Camera

Sets the main camera.

public set

mainScene: Scene

Sets the main scene.

public get

Sets the render to screen flag.

public set
public

Indicates whether this pass is enabled.

public

The name of this pass.

public

Only relevant for subclassing.

public

Only relevant for subclassing.

protected

camera: Camera

The camera.

protected

renderer: WebGLRenderer

this member was deprecated.

The renderer.

protected

scene: Scene

The scene to render.

public

Performs a shallow search for disposable properties and deletes them.

public

getDepthTexture(): Texture

Returns the current depth texture.

public

getFullscreenMaterial(): Material

this method was deprecated. Use fullscreenMaterial instead.

Returns the current fullscreen material.

public

initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number)

Performs initialization tasks.

public
this method was deprecated. Use enabled instead.

Indicates whether this pass is enabled.

public abstract

render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, outputBuffer: WebGLRenderTarget, deltaTime: Number, stencilTest: Boolean)

Renders this pass.

public

setDepthTexture(depthTexture: Texture, depthPacking: DepthPackingStrategy)

Sets the depth texture.

public
this method was deprecated. Use enabled instead.

Enables or disables this pass.

public

setRenderer(renderer: WebGLRenderer)

this method was deprecated.

Sets the renderer

public

setSize(width: Number, height: Number)

Sets the size.

protected

setFullscreenMaterial(value: Material)

this method was deprecated. Use fullscreenMaterial instead.

Sets the fullscreen material.

Public Constructors

public constructor(scene: Scene, camera: Camera, overrideMaterial: Material) source

Constructs a new render pass.

Override:

Pass#constructor

Params:

NameTypeAttributeDescription
scene Scene

The scene to render.

camera Camera

The camera to use to render the scene.

overrideMaterial Material
  • optional
  • default: null

An override material.

Public Members

public camera: * source

The camera.

Override:

Pass#camera

public get clear: Boolean source

this get was deprecated. Use clearPass.enabled instead.

Indicates whether the target buffer should be cleared before rendering.

public set clear source

public clearPass: ClearPass source

A clear pass.

public ignoreBackground: Boolean source

Indicates whether the scene background should be ignored.

public set mainCamera source

Sets the main camera.

Override:

Pass#mainCamera

public set mainScene source

Sets the main scene.

Override:

Pass#mainScene

public needsSwap: boolean source

Only relevant for subclassing.

Indicates whether the EffectComposer should swap the frame buffers after this pass has finished rendering. Set this to false if this pass doesn't render to the output buffer or the screen. Otherwise, the contents of the input buffer will be lost.

Override:

Pass#needsSwap

public get overrideMaterial: Material source

The current override material.

public set overrideMaterial source

public get renderToScreen: * source

Sets the render to screen flag.

If this flag is changed, the fullscreen material will be updated as well.

Override:

Pass#renderToScreen

public set renderToScreen source

Sets the render to screen flag.

If this flag is changed, the fullscreen material will be updated as well.

Override:

Pass#renderToScreen

public scene: * source

The scene to render.

Override:

Pass#scene

public selection: Selection source

A selection of objects to render.

public skipShadowMapUpdate: Boolean source

Indicates whether the shadow map auto update should be skipped.

Public Methods

public getClearPass(): ClearPass source

this method was deprecated. Use clearPass.enabled instead.

Returns the clear pass.

Return:

ClearPass

The clear pass.

public getOverrideMaterial(): Material source

this method was deprecated. Use overrideMaterial instead.

Returns the current override material.

Return:

Material

The material.

public getSelection(): Selection source

this method was deprecated. Use selection instead.

Returns the selection. Default is null (no restriction).

Return:

Selection

The selection.

public isBackgroundDisabled(): Boolean source

this method was deprecated. Use ignoreBackground instead.

Indicates whether the scene background is disabled.

Return:

Boolean

Whether the scene background is disabled.

public isShadowMapDisabled(): Boolean source

this method was deprecated. Use skipShadowMapUpdate instead.

Indicates whether the shadow map auto update is disabled.

Return:

Boolean

Whether the shadow map update is disabled.

public render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, outputBuffer: WebGLRenderTarget, deltaTime: Number, stencilTest: Boolean) source

Renders the scene.

Override:

Pass#render

Params:

NameTypeAttributeDescription
renderer WebGLRenderer

The renderer.

inputBuffer WebGLRenderTarget

A frame buffer that contains the result of the previous pass.

outputBuffer WebGLRenderTarget

A frame buffer that serves as the output render target unless this pass renders to screen.

deltaTime Number
  • optional

The time between the last frame and the current one in seconds.

stencilTest Boolean
  • optional

Indicates whether a stencil mask is active.

public setBackgroundDisabled(value: Boolean) source

this method was deprecated. Use ignoreBackground instead.

Enables or disables the scene background.

Params:

NameTypeAttributeDescription
value Boolean

Whether the scene background should be disabled.

public setOverrideMaterial(value: *): Material source

this method was deprecated. Use overrideMaterial instead.

Sets the override material.

Params:

NameTypeAttributeDescription
value *

Return:

Material

value - The material.

public setSelection(value: Selection) source

this method was deprecated. Use selection instead.

Sets the selection. Set to null to disable.

Params:

NameTypeAttributeDescription
value Selection

The selection.

public setShadowMapDisabled(value: Boolean) source

this method was deprecated. Use skipShadowMapUpdate instead.

Enables or disables the shadow map auto update.

Params:

NameTypeAttributeDescription
value Boolean

Whether the shadow map auto update should be disabled.