TextureEffect
Extends:
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. |
Method Summary
Public Methods | ||
public |
setTextureSwizzleRGBA(r: ColorChannel, g: ColorChannel, b: ColorChannel, a: ColorChannel) Sets the swizzles that will be applied to the |
|
public |
Updates this effect. |
Inherited Summary
From class Effect | ||
public |
The blend mode of this effect. |
|
public |
Preprocessor macro definitions. |
|
public |
WebGL extensions that are required by this effect. |
|
public |
The name of this effect. |
|
public |
Shader uniforms. |
|
public |
dispose() Performs a shallow search for properties that define a dispose method and deletes them. |
|
public |
Returns the effect attributes. |
|
public |
Returns the fragment shader. |
|
public |
Returns the vertex shader. |
|
public |
initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) Performs initialization tasks. |
|
public |
setDepthTexture(depthTexture: Texture, depthPacking: Number) Sets the depth texture. |
|
public |
Updates the size of this effect. |
|
public |
Updates the effect by performing supporting operations. |
|
protected |
setAttributes(attributes: EffectAttribute) Sets the effect attributes. |
|
protected |
Informs the associated EffectPass that this effect has changed in a way that requires a shader recompilation. |
|
protected |
setFragmentShader(fragmentShader: String) Sets the fragment shader. |
|
protected |
setVertexShader(vertexShader: String) Sets the vertex shader. |
Public Constructors
public constructor(options: Object) source
Constructs a new texture effect.
Override:
Effect#constructorParams:
Name | Type | Attribute | Description |
options | Object |
|
The options. |
options.blendFunction | BlendFunction |
|
The blend function of this effect. |
options.texture | Texture |
|
A texture. |
options.aspectCorrection | Boolean |
|
Deprecated. Enable uvTransform instead and adjust the texture's offset, repeat and center. |
Public Members
public get aspectCorrection: Number source
Indicates whether aspect correction is enabled.
If enabled, the texture can be scaled using the scale
uniform.
public set aspectCorrection: Number source
Enables or disables aspect correction.
Public Methods
public setTextureSwizzleRGBA(r: ColorChannel, g: ColorChannel, b: ColorChannel, a: ColorChannel) source
Sets the swizzles that will be applied to the r
, g
, b
, and a
components of a texel before it is written to the output color.
Params:
Name | Type | Attribute | Description |
r | ColorChannel | The swizzle for the |
|
g | ColorChannel |
|
The swizzle for the |
b | ColorChannel |
|
The swizzle for the |
a | ColorChannel |
|
The swizzle for the |
public update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number) source
Updates this effect.
Override:
Effect#updateParams:
Name | Type | Attribute | Description |
renderer | WebGLRenderer | The renderer. |
|
inputBuffer | WebGLRenderTarget | A frame buffer that contains the result of the previous pass. |
|
deltaTime | Number |
|
The time between the last frame and the current one in seconds. |