Home Reference Source
import {TexturePass} from 'postprocessing/src/passes/TexturePass.js'
public class | source

TexturePass

Extends:

Pass → TexturePass

Indirect Implements:

A pass that renders a given texture.

Constructor Summary

Public Constructor
public

constructor(texture: Texture, opacity: Number, screenMode: Boolean)

Constructs a new texture pass.

Member Summary

Public Members
public get

The opacity of the input buffer.

public set
public get

The opacity of the texture.

public set
public get

texture: Texture

The texture.

public set

texture: Texture

Method Summary

Public Methods
public

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

Renders the effect.

Inherited Summary

From class Pass
public get

material: Material

this get was deprecated. Use getFullscreenMaterial() instead.

The fullscreen material.

protected set

material: Material

this set was deprecated. Use setFullscreenMaterial(Material) instead.
public

[key]: *

public

Indicates whether this pass should be executed.

public

The name of this pass.

public

Indicates whether the EffectComposer should swap the frame buffers after this pass has finished rendering.

public

Indicates whether this pass should render to screen.

protected

camera: Camera

The camera.

protected

scene: Scene

The scene to render.

private

quad: Mesh

A quad mesh that fills the screen.

public

Performs a shallow search for disposable properties and deletes them.

public

getFullscreenMaterial(): Material

Returns the current fullscreen material.

public

initialize(renderer: WebGLRenderer, alpha: Boolean)

Performs initialization tasks.

public abstract

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

Renders the effect.

public

setSize(width: Number, height: Number)

Updates this pass with the renderer's size.

You may override this method in case you want to be informed about the main render size.

The EffectComposer calls this method before this pass is initialized and every time its own size is updated.

protected

setFullscreenMaterial(material: Material)

Sets the fullscreen material.

Public Constructors

public constructor(texture: Texture, opacity: Number, screenMode: Boolean) source

Constructs a new texture pass.

Override:

Pass#constructor

Params:

NameTypeAttributeDescription
texture Texture

The texture.

opacity Number
  • optional
  • default: 1.0

The texture opacity.

screenMode Boolean
  • optional
  • default: true

Whether the screen blend mode should be used for combining the texture with the scene colors.

Public Members

public get opacityDestination: Number source

The opacity of the input buffer.

The destination color is the color from the image in the input buffer.

public set opacityDestination: Number source

public get opacitySource: Number source

The opacity of the texture.

The source color is the color from the texture.

public set opacitySource: Number source

public get texture: Texture source

The texture.

public set texture: Texture source

Public Methods

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

Renders the effect.

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.

delta Number
  • optional

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

stencilTest Boolean
  • optional

Indicates whether a stencil mask is active.