Renderer · interface
BloomResponse
How a frame's bloom answers the light it is given, beside the strength and threshold setBloom
already takes. Absent, or a field absent, is the response every frame had before 4.8.6.
Explained in Hello world.
interface BloomResponseimport type { BloomResponse } from '@driftengine/core';In depth
Why it exists: one band over the colour less the threshold washes a stage built for another
engine. A ramped bloom keeps saturate((L − threshold) / 2) of a colour rather than
the colour less the threshold, and spreads it over six bands, each in a tint of its own. A
stage authored against that — a threshold of 0.1 and tints summing below one — came out white
here, because subtracting so low a threshold keeps nearly every light in the frame at full
strength. These are the two things that differ, as numbers.
Properties
| Name | Type | Description |
|---|---|---|
rampreadonlyoptional | number | Scene units over which a colour comes in, from none of it at the threshold to all of it this
far past. 0, the default, subtracts instead: a colour keeps what it has past the threshold,
the response since bloom shipped. A ramped bloom's is 2 after exposure, so a frame exposed by
e that wants it passes 2 / e, as it passes the threshold over the exposure.MoreBrightness is still the largest channel rather than luminance, for the reason
|
tintsreadonlyoptional | ArrayLike<number> | Each level's colour, three numbers a level, finest first: the halo at a few pixels first and
at a twentieth of the frame last. White, the default, is the identity; a level not named
takes white. Not clamped above one, which is how a tint carries a strength past the 0..1 the
dial gives — a stage asking for twice the light names tints twice as bright.MoreAt most |