Whether this pass runs
Flipping it rebuilds the view's render graph on the next render, which suits a settings toggle but not a change every frame; animate an effect's own properties instead. It can also recompile the view's materials; View3D#passes says when.
Readonly AdvancedinputWhether the effect's input has mips, for an effect that reads coarse levels with
sampleColorLod, such as a blur
Costs a mip generation every frame and about a third more memory for the input, so leave it
false unless the effect samples levels above 0.
Readonly AdvancedlevelsNumber of blur levels, fixed at construction
Optional ReadonlyrequiredExtra outputs the view's scene draw writes beside its colour while this pass is enabled
Each costs the scene draw a texture and the shader work to fill it, and any output makes the view draw its scene into a texture first, as a post effect does. Reach an output's texture with RenderGraph#getSceneOutput, to read it or draw into it.
Readonly AdvancedresolutionTexels per logical pixel for the largest blur level, fixed at construction
Readonly AdvancedstageThe stage the effect runs at, set by the stage option
StaticdefaultDefaults for every new BloomEffect; an option passed as undefined keeps its default
Sets the glow strength
Multiplier on the glow.
Sets how far the glow spreads
0 (tight) to 1 (wide).
Brightness above which a pixel blooms; BloomEffectOptions#threshold has the details
Sets the bloom threshold
Brightness of a pixel's brightest channel.
Advanced
Adds the effect's passes for this slot in the chain
Render graph being built.
Input/output handles for this slot in the chain.
Releases GPU resources the pass made outside the graph; the base class has none
The view never calls it, not on replacing view.passes nor on its own destroy, since a pass
can be shared. Call it yourself once the pass is retired. Override it only for resources of your
own: the render passes added in build go with the view's graph, and a plain UniformGroup
needs no release.
Bright parts of the frame glow outward
The effect keeps what's brighter than
threshold, blurs it throughlevelstextures, each half the size of the last, and adds the result back onto the frame. That costs2 × levelspasses, all but the last atresolutionor smaller.threshold,intensityandradiuscan change every frame;levelsandresolutionare fixed, so replace the effect to change them.By default it runs before the tone curve, where emissive surfaces, lights and specular glints are still brighter than 1, so they glow in their own colour. Lower
thresholdto let bright but ordinary surfaces glow too, for a hazier look.Example