Skip to content

Instantly share code, notes, and snippets.

@gvlsq
gvlsq / blooms_commands_examples.cpp
Last active October 25, 2021 22:34
Implementation of bloom in Blooms
inline void
Bloom(bitmap Bitmap,
f32 LuminanceThreshold,
int Radius, f32 Sigma)
{
// NOTE: An implementation of bloom, a glow artifact found in some
// real world photography.
bitmap BloomedAreas = CloneBitmap(Bitmap);
Threshold(BloomedAreas, LuminanceThreshold, ThresholdType_Chromatic);