@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(), optionalsetSize()/setPixelRatio()). On WebGL it is theEffectComposeritself.ecsPostprocessingComposerActive—truewhileRenderSystemshould 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 ​
new PostprocessingSyncSystem(
renderer,
scene,
camera,
backend?): PostprocessingSyncSystem;Defined in: systems/PostprocessingSyncSystem.ts:55
Parameters ​
| Parameter | Type | Description |
|---|---|---|
renderer | EcsRenderer | - |
scene | Scene | - |
camera | PerspectiveCamera | - |
backend? | RenderBackend | Builds the chain. When omitted, the world's backend (world.getRenderBackend()) is used. |
Returns ​
PostprocessingSyncSystem
Properties ​
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
runsWhilePaused | readonly | true | true | Keep 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() ​
update(world): void;Defined in: systems/PostprocessingSyncSystem.ts:157
Parameters ​
| Parameter | Type |
|---|---|
world | World |
Returns ​
void
Implementation of ​
dispose() ​
dispose(): void;Defined in: systems/PostprocessingSyncSystem.ts:189
Returns ​
void

