Files
test/sexp_effects/effects/bloom.sexp
gilesb 406cc7c0c7 Initial commit: video effects processing system
Add S-expression based video effects pipeline with modular effect
definitions, constructs, and recipe files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 12:34:45 +00:00

15 lines
510 B
Common Lisp

;; 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")))