- Remove legacy_tasks.py, hybrid_state.py, render.py - Remove old task modules (analyze, execute, execute_sexp, orchestrate) - Add streaming interpreter from test repo - Add sexp_effects with primitives and video effects - Add streaming Celery task with CID-based asset resolution - Support both CID and friendly name references for assets - Add .dockerignore to prevent local clones from conflicting Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
728 B
Common Lisp
20 lines
728 B
Common Lisp
;; Film Grain effect - adds film grain texture
|
|
(require-primitives "core")
|
|
|
|
(define-effect film_grain
|
|
:params (
|
|
(intensity :type float :default 0.2 :range [0 1])
|
|
(colored :type bool :default false)
|
|
)
|
|
(let ((grain-amount (* intensity 50)))
|
|
(map-pixels frame
|
|
(lambda (x y c)
|
|
(if colored
|
|
(rgb (clamp (+ (red c) (gaussian 0 grain-amount)) 0 255)
|
|
(clamp (+ (green c) (gaussian 0 grain-amount)) 0 255)
|
|
(clamp (+ (blue c) (gaussian 0 grain-amount)) 0 255))
|
|
(let ((n (gaussian 0 grain-amount)))
|
|
(rgb (clamp (+ (red c) n) 0 255)
|
|
(clamp (+ (green c) n) 0 255)
|
|
(clamp (+ (blue c) n) 0 255))))))))
|