Files
test/sexp_effects/effects/rgb_split.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

13 lines
510 B
Common Lisp

;; RGB Split effect - chromatic aberration
;; @param offset_x float [-50, 50] default 10
;; @param offset_y float [-50, 50] default 0
(define-effect rgb_split
((offset_x 10) (offset_y 0))
(let* ((r (channel frame 0))
(g (channel frame 1))
(b (channel frame 2))
(r-shifted (translate (merge-channels r r r) offset_x offset_y))
(b-shifted (translate (merge-channels b b b) (- offset_x) (- offset_y))))
(merge-channels (channel r-shifted 0) g (channel b-shifted 0))))