API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classBloomFilter
A Filter that adds a soft glow around the bright parts of its input - bloom, in the engine's ordinary sRGB path. Pixels whose luminance passes threshold are extracted through a soft knee, carried down a chain of levels halvings, blurred by strength on the smallest of them, carried back up, and added on top of the unchanged input. Only the EXCESS over the threshold glows, so a scene keeps its own colours instead of washing out. The glow is added LIGHT: it carries no alpha of its own, so it brightens whatever it spreads onto and never darkens it, and a half-transparent subject keeps exactly the alpha it came in with. ```ts // A glow around the lamps, leaving everything below 70% luminance alone. world.filters = [new BloomFilter({ threshold: 0.7, intensity: 1.4, strength: 12 })]; ``` The glow reaches `strength * 3` logical units outside its input - the blur's truncation point - plus the spread the halving chain adds on its own, so a subject at rest keeps the room its glow needs. ## Range There is no HDR anywhere in the chain: the input, every intermediate and the result are eight-bit sRGB. The extraction keeps headroom for an intensity of roughly `1 / (1 - threshold)` before the glow saturates to white, which is where the effect stops getting brighter and starts getting flatter. Grading belongs to LutFilter, before or after this one. Runs on a ShaderFilter carrying both a GLSL and a WGSL source, so it works on either backend without the caller choosing one.
import { BloomFilter } from '@codexo/exojs'A Filter that adds a soft glow around the bright parts of its input - bloom, in the engine's ordinary sRGB path.
Pixels whose luminance passes threshold are extracted through a soft knee, carried down a chain of levels halvings, blurred by strength on the smallest of them, carried back up, and added on top of the unchanged input. Only the EXCESS over the threshold glows, so a scene keeps its own colours instead of washing out.
The glow is added LIGHT: it carries no alpha of its own, so it brightens whatever it spreads onto and never darkens it, and a half-transparent subject keeps exactly the alpha it came in with.
```ts // A glow around the lamps, leaving everything below 70% luminance alone. world.filters = [new BloomFilter({ threshold: 0.7, intensity: 1.4, strength: 12 })]; ```
The glow reaches `strength * 3` logical units outside its input - the blur's truncation point - plus the spread the halving chain adds on its own, so a subject at rest keeps the room its glow needs.
## Range
There is no HDR anywhere in the chain: the input, every intermediate and the result are eight-bit sRGB. The extraction keeps headroom for an intensity of roughly `1 / (1 - threshold)` before the glow saturates to white, which is where the effect stops getting brighter and starts getting flatter. Grading belongs to LutFilter, before or after this one.
Runs on a ShaderFilter carrying both a GLSL and a WGSL source, so it works on either backend without the caller choosing one.
new(options: BloomFilterOptionsConstruction-time options for a BloomFilter.): BloomFilterapply(backend: RenderBackend, input: RenderTextureAn off-screen render target that can also be sampled as a texture. Combines RenderTarget (framebuffer attachment) with the sampler parameters of a Texture (sca…, output: RenderTextureAn off-screen render target that can also be sampled as a texture. Combines RenderTarget (framebuffer attachment) with the sampler parameters of a Texture (sca…, resolution: number): voiddestroy(): voidgetOutputBounds(input: ReadonlyRectangleRead-only view of a Rectangle: every accessor and non-mutating query a rectangle offers, with none of its writers. Returned by APIs that hand out a LIVE intern…, output: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…): voidinvalidate(): voidresolution: TargetResolutionintensity: numberlevels: numberquality: numberstrength: numberthreshold: number