Function: createToneMapEcsSystem()
createToneMapEcsSystem(
renderContext):EcsSystem<[CameraEcsComponent,ToneMappingEcsComponent],void,void>
Defined in: rendering/systems/tone-map-system.ts:35
Creates a tone mapping post-processing system: compresses a camera's HDR
render target back into displayable [0, 1] range.
For each camera with both a renderTarget and a
ToneMappingEcsComponent, applies the configured exposure and operator
(see TONE_MAPPING_OPERATOR) and writes the result back into that same
renderTarget. Cameras without a renderTarget, or without a
ToneMappingEcsComponent (attach one with addToneMappingComponent), are left
untouched.
Must be registered after any HDR-producing passes (render, bloom, blur)
and before the present system, since anything left un-tone-mapped is
presented as-is and hard-clips at [0, 1] instead of rolling off
smoothly.
Parameters
renderContext
The rendering context
Returns
EcsSystem<[CameraEcsComponent, ToneMappingEcsComponent], void, void>
The tone mapping ECS system