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>
13 lines
510 B
Common Lisp
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))))
|