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

TextureEffect

Extends:

Effect → TextureEffect

Indirect Implements:

A texture effect.

Constructor Summary

Public Constructor
public

constructor(options: Object)

Constructs a new texture effect.

Member Summary

Public Members
public get
this get was deprecated. Use uvTransform instead for full control over the texture coordinates.

Indicates whether aspect correction is enabled.

public set
this set was deprecated. Use uvTransform instead for full control over the texture coordinates.

Enables or disables aspect correction.

public get

texture: Texture

The texture.

public set

texture: Texture

Sets the texture.

public get

Indicates whether the texture UV coordinates will be transformed using the transformation matrix of the texture.

public set

Enables or disables texture UV transformation.

public

Method Summary

Public Methods
public

update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number)

Updates this effect.

Inherited Summary

From class Effect
public

The effect attributes.

public

The blend mode of this effect.

public

Preprocessor macro definitions.

public

WebGL extensions that are required by this effect.

public

The fragment shader.

public

The name of this effect.

public

uniforms: Map<String, Uniform>

Shader uniforms.

public

The vertex shader.

public

Performs a shallow search for properties that define a dispose method and deletes them.

public

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

Performs initialization tasks.

public

setDepthTexture(depthTexture: Texture, depthPacking: Number)

Sets the depth texture.

public

setSize(width: Number, height: Number)

Updates the size of this effect.

public

update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number)

Updates the effect by performing supporting operations.

Public Constructors

public constructor(options: Object) source

Constructs a new texture effect.

Override:

Effect#constructor

Params:

NameTypeAttributeDescription
options Object
  • optional

The options.

options.blendFunction BlendFunction
  • optional
  • default: BlendFunction.NORMAL

The blend function of this effect.

options.texture Texture
  • optional

A texture.

options.aspectCorrection Boolean
  • optional
  • default: false

Deprecated. Enable uvTransform instead and adjust the texture's offset, repeat and center.

Public Members

public get aspectCorrection: Number source

this get was deprecated. Use uvTransform instead for full control over the texture coordinates.

Indicates whether aspect correction is enabled.

If enabled, the texture can be scaled using the scale uniform.

public set aspectCorrection: Number source

this set was deprecated. Use uvTransform instead for full control over the texture coordinates.

Enables or disables aspect correction.

You'll need to call EffectPass#recompile after changing this value.

public get texture: Texture source

The texture.

public set texture: Texture source

Sets the texture.

You'll need to call EffectPass#recompile if you switch to a texture that uses a different encoding.

public get uvTransform: Number source

Indicates whether the texture UV coordinates will be transformed using the transformation matrix of the texture.

Cannot be used if aspect correction is enabled.

public set uvTransform: Number source

Enables or disables texture UV transformation.

You'll need to call EffectPass#recompile after changing this value.

public vertexShader: * source

The vertex shader.

Override:

Effect#vertexShader

Public Methods

public update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number) source

Updates this effect.

Override:

Effect#update

Params:

NameTypeAttributeDescription
renderer WebGLRenderer

The renderer.

inputBuffer WebGLRenderTarget

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

deltaTime Number
  • optional

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