MCPcopy Index your code
hub / github.com/clips/pattern / bloom

Function bloom

pattern/canvas.js:3335–3345  ·  view source on GitHub ↗
(img, intensity, radius, threshold)

Source from the content-addressed store, hash-verified

3333}
3334
3335function bloom(img, intensity, radius, threshold) {
3336 /* Returns the image blended with a blurred brightpass version, yielding a "magic glow" effect.
3337 * - intensity: the opacity of the blur (0.0-1.0).
3338 * - radius : the blur radius.
3339 * - threshold: the luminance threshold of pixels that light up.
3340 */
3341 if (intensity === undefined) intensity = 0.5;
3342 if (threshold === undefined) threshold = 0.3;
3343 var b = blur(brightpass(img, threshold), radius);
3344 return blend(ADD, img, b, 0, 0, intensity);
3345}
3346
3347/*--- IMAGE FILTERS | DISTORTION -------------------------------------------------------------------*/
3348// Based on: L. Spagnolini, 2007, http://dem.ocracy.org/libero/photobooth/

Callers

nothing calls this directly

Calls 3

blurFunction · 0.85
brightpassFunction · 0.85
blendFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…