(img, intensity, radius, threshold)
| 3333 | } |
| 3334 | |
| 3335 | function 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/ |
nothing calls this directly
no test coverage detected
searching dependent graphs…