Home Reference Source
import {SelectiveBloomEffect} from 'postprocessing'
public class | source

SelectiveBloomEffect

Extends:

three~EventDispatcherEffectBloomEffect → SelectiveBloomEffect

Indirect Implements:

A selective bloom effect.

This effect applies bloom to selected objects only.

Attention: If you don't need to limit bloom to a subset of objects, consider using the BloomEffect instead for better performance.

Constructor Summary

Public Constructor
public

constructor(scene: Scene, camera: Camera, options: Object)

Constructs a new selective bloom effect.

Member Summary

Public Members
public get

Indicates whether the background colors will be ignored.

public set
public get

Indicates whether the selection should be considered inverted.

public set

Inverts the selection.

public

A selection of objects.

Method Summary

Public Methods
public

initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number)

Performs initialization tasks.

public

setDepthTexture(depthTexture: Texture, depthPacking: Number)

Sets the depth texture.

public

setSize(width: Number, height: Number)

Updates the size of internal render targets.

public

update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number)

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

uniforms: Map<String, Uniform>

Shader uniforms.

public

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

setSize(width: Number, height: Number)

Updates the size of this effect.

public

update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number)

Updates the effect by performing supporting operations.

protected

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.

From class BloomEffect
public get
this get was deprecated. Use luminanceMaterial.threshold and luminanceMaterial.smoothing instead.
public set
this set was deprecated. Use luminanceMaterial.threshold and luminanceMaterial.smoothing instead.
public get
this get was deprecated. Set the frameBufferType of the EffectComposer to HalfFloatType instead.

Indicates whether dithering is enabled.

public set
this set was deprecated. Set the frameBufferType of the EffectComposer to HalfFloatType instead.

Enables or disables dithering.

public get
this get was deprecated. Use resolution.height instead.

The current height of the internal render targets.

public set
this set was deprecated. Use resolution.height instead.

Sets the render height.

public get

The bloom intensity.

public set

Sets the bloom intensity.

public get
this get was deprecated. Use blurPass.kernelSize instead.

The blur kernel size.

public set
this set was deprecated. Use blurPass.kernelSize instead.
public get

The luminance material.

public get

The resolution of this effect.

public get

texture: Texture

A texture that contains the intermediate result of this effect.

public get
this get was deprecated. Use resolution.width instead.

The current width of the internal render targets.

public set
this set was deprecated. Use resolution.width instead.

Sets the render width.

public

A blur pass.

public

A luminance shader pass.

public
this method was deprecated. Adjust the fixed resolution width or height instead.

Returns the current resolution scale.

public

initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number)

Performs initialization tasks.

public
this method was deprecated. Adjust the fixed resolution width or height instead.

Sets the resolution scale.

public

setSize(width: Number, height: Number)

Updates the size of internal render targets.

public

update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number)

Updates this effect.

Public Constructors

public constructor(scene: Scene, camera: Camera, options: Object) source

Constructs a new selective bloom effect.

Override:

BloomEffect#constructor

Params:

NameTypeAttributeDescription
scene Scene

The main scene.

camera Camera

The main camera.

options Object
  • optional

The options. See BloomEffect for details.

Public Members

public get ignoreBackground: Boolean source

Indicates whether the background colors will be ignored.

public set ignoreBackground: Boolean source

public get inverted: Boolean source

Indicates whether the selection should be considered inverted.

public set inverted: Boolean source

Inverts the selection.

public selection: Selection source

A selection of objects.

The default layer of this selection is 11.

Public Methods

public initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) source

Performs initialization tasks.

Override:

BloomEffect#initialize

Params:

NameTypeAttributeDescription
renderer WebGLRenderer

The renderer.

alpha Boolean

Whether the renderer uses the alpha channel.

frameBufferType Number

The type of the main frame buffers.

public setDepthTexture(depthTexture: Texture, depthPacking: Number) source

Sets the depth texture.

Override:

Effect#setDepthTexture

Params:

NameTypeAttributeDescription
depthTexture Texture

A depth texture.

depthPacking Number
  • optional
  • default: BasicDepthPacking

The depth packing.

public setSize(width: Number, height: Number) source

Updates the size of internal render targets.

Override:

BloomEffect#setSize

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.

public update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number) source

Updates this effect.

Override:

BloomEffect#update

Params:

NameTypeAttributeDescription
renderer WebGLRenderer

The renderer.

inputBuffer WebGLRenderTarget

A frame buffer that contains the result of the previous pass.

deltaTime Number
  • optional

The time between the last frame and the current one in seconds.