Capítulo 256 de 859
Pass for creating a RGB halftone effect.
const params = {
shape: 1,
radius: 4,
rotateR: Math.PI / 12,
rotateB: Math.PI / 12 * 2,
rotateG: Math.PI / 12 * 3,
scatter: 0,
blending: 1,
blendingMode: 1,
greyscale: false,
disable: false
};
const halftonePass = new HalftonePass( params );
composer.addPass( halftonePass );
Constructor
| Signature |
|---|
new HalftonePass( params : Object ) |
Properties
| Property | Description |
|---|---|
.material : ShaderMaterial | The pass material. |
.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 halftone pass. |
.setSize( width : number, height : number ) | Sets the size of the pass. |