Expand description
Proper Bloom Pipeline — multi-level downsample/upsample bloom with brightness threshold.
Only intentionally bright things glow. UI text (emission 0.0) never blooms. Damage numbers (emission 1.5), crits (emission 2.5), spells (emission 2.0+), boss auras (emission 1.0) all bloom at appropriate intensities.
§Pipeline
scene_emission_tex (from glyph fragment shader, attachment 1)
└─ Threshold extract (luminance > threshold) ─▶ bright_tex (full res)
├─ Downsample ½ ─▶ mip[0] ── H blur ── V blur ─▶ blurred[0]
├─ Downsample ¼ ─▶ mip[1] ── H blur ── V blur ─▶ blurred[1]
├─ Downsample ⅛ ─▶ mip[2] ── H blur ── V blur ─▶ blurred[2]
├─ Downsample 1/16 ─▶ mip[3] ── H blur ── V blur ─▶ blurred[3]
└─ Downsample 1/32 ─▶ mip[4] ── H blur ── V blur ─▶ blurred[4]
Upsample chain: blurred[4] + blurred[3] + ... + blurred[0] ─▶ bloom_result
Composite: scene_color + bloom_result × intensity ─▶ outputStructs§
- Bloom
Pipeline State - Describes the full multi-level bloom pipeline state for one frame.
- Bloom
Stats - Per-frame bloom statistics.
- Emission
Presets - Standard emission values for different game element categories. These control which elements participate in bloom and how strongly.
- Theme
Bloom - Bloom intensity profiles per game theme.
Constants§
- BLOOM_
BLUR_ FRAG - Separable Gaussian blur with variable sigma. Direction (1,0) for horizontal, (0,1) for vertical.
- BLOOM_
DOWNSAMPLE_ FRAG - Downsample shader (box filter 2x2). Takes a texture and renders it at half resolution.
- BLOOM_
THRESHOLD_ FRAG - Brightness threshold extraction shader.
- BLOOM_
UPSAMPLE_ FRAG - Upsample shader (bilinear + additive blend). Combines the current mip level with the upsampled lower mip.