;; Bloom effect - glow on bright areas ;; @param intensity float [0, 2] default 0.5 ;; @param threshold int [0, 255] default 200 ;; @param radius int [1, 50] default 15 (define-effect bloom ((intensity 0.5) (threshold 200) (radius 15)) (let* ((bright (map-pixels frame (lambda (x y c) (if (> (luminance c) threshold) c (rgb 0 0 0))))) (blurred (blur bright radius))) (blend-mode frame blurred "add")))