mk_post_bloomfunction
mk_texture_t mk_post_bloom(mk_texture_t hdr_src, const mk_bloom_params *params)Generate a bloom texture from a linear HDR source (dual-filter pyramid: soft-knee prefilter -> downsample chain -> additive tent upsample).
The returned texture is owned by the package (a half-resolution, auto-resizing internal target reused across frames) do NOT destroy it. Sample it via the tone-map composite: pass it as mk_post_tonemap_params.bloom. Lazily self-initializes. Returns MK_TEXTURE_INVALID on failure / invalid source.
| Parameter | Type | Description |
|---|---|---|
hdr_src | mk_texture_t | Linear HDR scene texture (e.g. an RGBA16F scene target's color). |
params | const mk_bloom_params * | Bloom threshold/knee/levels (NULL = sensible defaults). |
Returns Bloom texture to feed into mk_post_tonemap_linear, or MK_TEXTURE_INVALID.