PrivatelevelsPrivatethresholdPrivate ReadonlysmoothingPrivateradiusPrivatemipsPrivate ReadonlythresholdPrivate ReadonlydownsamplePrivate ReadonlyupsamplePrivate ReadonlythresholdPrivate ReadonlydownsamplePrivate ReadonlyupsamplePrivate ReadonlypassThe texture that the mega-shader samples for the bloom mix.
Output (mip[0]) resolution; useful for the mega-shader if it cares.
Number of mip levels allocated after applying the minimum-size cutoff.
Change the number of mip levels and rebuild the pyramid.
If canvasSize is omitted the new pyramid is rebuilt at the SAME
canvas size implied by the existing mip[0] (×2 because mip[0] is
half-res). Callers that have just resized the canvas MUST pass
the new size explicitly to avoid a stale-mip race.
OptionalcanvasSize: { width: number; height: number }Render the bloom pyramid from sceneTexture (the HDR scene
target's texture). After this returns, outputTexture holds the
bloom result.
PrivateallocateAllocate the mip pyramid for a canvas of the given size.
this.levels is the user-requested ceiling, but levels are also
capped on physical size: a mip whose dimension would drop below
MIN_MIP_DIM is skipped, because at 1×1 / 2×1 / 3×2 the per-pass
overhead (FBO bind, viewport setup, tile setup on TBDR GPUs)
dwarfs the actual texture work and adds visible cost without any
visual contribution. The first mip is always allocated so the
bloom output texture exists even at very low resolutions.
Privatedispose
Bloom pyramid implementation. The renderer is supplied to render(); the chain owns its mip-level render targets and three shader materials.