Capítulo 236 de 859
This pass can be used to render a texture over the entire screen.
const texture = new THREE.TextureLoader().load( 'textures/2294472375_24a3b8ef46_o.jpg' );
texture.colorSpace = THREE.SRGBColorSpace;
const texturePass = new TexturePass( texture );
composer.addPass( texturePass );
Constructor
| Signature |
|---|
new TexturePass( map : Texture, opacity : number ) |
Properties
| Property | Description |
|---|---|
.map : Texture | The texture to render. |
.material : ShaderMaterial | The pass material. |
.needsSwap : boolean | Overwritten to disable the swap. |
.opacity : number | The opacity. |
.uniforms : Object | The pass uniforms. |
Methods
| Method | Description |
|---|---|
.dispose() | Frees the GPU-related resources allocated by this instance. Call this method whenever the pass is no longer used in your app. |
.render( renderer : WebGLRenderer, writeBuffer : WebGLRenderTarget, readBuffer : WebGLRenderTarget, deltaTime : number, maskActive : boolean ) | Performs the texture pass. |