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>
This commit is contained in:
18
sexp_effects/effects/trails.sexp
Normal file
18
sexp_effects/effects/trails.sexp
Normal file
@@ -0,0 +1,18 @@
|
||||
;; Trails effect - persistent motion trails
|
||||
;; @param persistence float [0, 0.99] default 0.8
|
||||
|
||||
(define-effect trails
|
||||
((persistence 0.8))
|
||||
(let* ((buffer (state-get 'buffer nil))
|
||||
(current frame))
|
||||
(if (= buffer nil)
|
||||
(begin
|
||||
(state-set 'buffer (copy frame))
|
||||
frame)
|
||||
(let* ((faded (blend-images buffer
|
||||
(make-image (width frame) (height frame) (list 0 0 0))
|
||||
(- 1 persistence)))
|
||||
(result (blend-mode faded current "lighten")))
|
||||
(begin
|
||||
(state-set 'buffer result)
|
||||
result)))))
|
||||
Reference in New Issue
Block a user