Skip to content

Documentation / scene / Compositor

Class: Compositor

Defined in: libs/scene/src/posteffect/compositor.ts:69

Post processing compositor

Constructors

Constructor

new Compositor(): Compositor

Defined in: libs/scene/src/posteffect/compositor.ts:75

Creates an instance of Compositor

Returns

Compositor

Methods

buildLayer()

buildLayer(options): CompositorBuildLayerResult

Defined in: libs/scene/src/posteffect/compositor.ts:103

Build the enabled effects of a layer as render graph passes.

Effects are chained through graph texture handles: each effect's setup() declares its passes reading the previous output. Where each effect output lands (intermediate texture or the final target) is decided here through the PostEffectSetupContext.createOutput implementation, so effect code never handles final-target selection.

Parameters

options

CompositorBuildLayerOptions

Build inputs.

Returns

CompositorBuildLayerResult

The chain output handle and whether the final target was written directly.


appendPostEffect()

appendPostEffect(postEffect): void

Defined in: libs/scene/src/posteffect/compositor.ts:187

Adds a posteffect

Parameters

postEffect

AbstractPostEffect

The post effect to add

Returns

void


removePostEffect()

removePostEffect(postEffect): void

Defined in: libs/scene/src/posteffect/compositor.ts:203

Removes a posteffect that was previously added

Parameters

postEffect

AbstractPostEffect

The posteffect to be remove.

Returns

void


clear()

clear(): void

Defined in: libs/scene/src/posteffect/compositor.ts:216

Removes all post effects

Returns

void

Released under the MIT License.