Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / PostprocessingSyncSystem

Class: PostprocessingSyncSystem ​

Defined in: systems/PostprocessingSyncSystem.ts:39

Builds the post-processing chain from the scene's Postprocessing component and hands it to RenderSystem through scene.userData:

  • ecsPostprocessingComposer — the built chain (render(), dispose(), optional setSize() / setPixelRatio()). On WebGL it is the EffectComposer itself.
  • ecsPostprocessingComposerActive — true while RenderSystem should render through it.
  • ecsPostprocessing — the values the chain was built from.

The chain itself comes from the world's render backend: an EffectComposer on WebGL (pass order: scene render → depth of field → bloom → vignette → hue/saturation → sepia → film noise → dot screen → SSAO → glitch → chromatic aberration → pixelation → SMAA → output), a RenderPipeline of TSL nodes with webgpuBackend. A backend that can update a chain in place (the WebGPU one) skips the rebuild when only parameters changed.

The toneMapping effect has no pass of its own: when active it asks the renderer for tone mapping, which the chain's output step then applies. See Environment.values.lighting.toneMapping for how the two combine.

Implements ​

Constructors ​

Constructor ​

ts
new PostprocessingSyncSystem(
   renderer, 
   scene, 
   camera, 
   backend?): PostprocessingSyncSystem;

Defined in: systems/PostprocessingSyncSystem.ts:55

Parameters ​

ParameterTypeDescription
rendererEcsRenderer-
sceneScene-
cameraPerspectiveCamera-
backend?RenderBackendBuilds the chain. When omitted, the world's backend (world.getRenderBackend()) is used.

Returns ​

PostprocessingSyncSystem

Properties ​

PropertyModifierTypeDefault valueDescriptionDefined in
runsWhilePausedreadonlytruetrueKeep ticking while the world is paused. Leave it unset for anything that moves the game on: such a system stops at world.pause() and picks up where it was at world.resume().systems/PostprocessingSyncSystem.ts:40

Methods ​

update() ​

ts
update(world): void;

Defined in: systems/PostprocessingSyncSystem.ts:157

Parameters ​

ParameterType
worldWorld

Returns ​

void

Implementation of ​

EcsSystem.update


dispose() ​

ts
dispose(): void;

Defined in: systems/PostprocessingSyncSystem.ts:189

Returns ​

void

Implementation of ​

EcsSystem.dispose