Capítulo 242 de 859

Chapter 242: BloomPass

Core Idea

A pass for a basic Bloom effect.

UnrealBloomPass produces a more advanced Bloom but is also more expensive.

Key Concepts

  • combineUniforms : Object: The combine pass uniforms.
  • convolutionUniforms : Object: The convolution pass uniforms.
  • materialCombine : ShaderMaterial: The combine pass material.
  • materialConvolution : ShaderMaterial: The convolution pass material.
  • needsSwap : boolean: Overwritten to disable the swap.

Code Examples

const effectBloom = new BloomPass( 0.75 );
composer.addPass( effectBloom );
  • What it demonstrates: Typical usage of BloomPass.

Reference Tables

Constructor

Signature
new BloomPass( strength : number, kernelSize : number, sigma : number )

Properties

PropertyDescription
.combineUniforms : ObjectThe combine pass uniforms.
.convolutionUniforms : ObjectThe convolution pass uniforms.
.materialCombine : ShaderMaterialThe combine pass material.
.materialConvolution : ShaderMaterialThe convolution pass material.
.needsSwap : booleanOverwritten to disable the swap.

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 Bloom pass.
.setSize( width : number, height : number )Sets the size of the pass.

Key Takeaways

  1. BloomPass extends: Pass
  2. Most relevant properties: combineUniforms, convolutionUniforms, materialCombine, materialConvolution.
  3. Key methods: dispose, render, setSize.

Connects To