Capítulo 250 de 859

Chapter 250: DotScreenPass

Core Idea

Pass for creating a dot-screen effect.

Key Concepts

  • material : ShaderMaterial: The pass material.
  • uniforms : Object: The pass uniforms. Use this object if you want to update the center, angle or scale values at runtime.

Code Examples

const pass = new DotScreenPass( new THREE.Vector2( 0, 0 ), 0.5, 0.8 );
composer.addPass( pass );
  • What it demonstrates: Typical usage of DotScreenPass.

Reference Tables

Constructor

Signature
new DotScreenPass( center : Vector2, angle : number, scale : number )

Properties

PropertyDescription
.material : ShaderMaterialThe pass material.
.uniforms : ObjectThe pass uniforms. Use this object if you want to update the center, angle or scale values at runtime.

Methods

MethodDescription
.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 dot screen pass.

Key Takeaways

  1. DotScreenPass extends: Pass
  2. Most relevant properties: material, uniforms.
  3. Key methods: dispose, render.

Connects To