- Add stream_sexp_generic.py: fully generic sexp interpreter - Add streaming primitives for video sources and audio analysis - Add config system for external sources and audio files - Add templates for reusable scans and macros - Fix video/audio stream mapping in file output - Add dynamic source cycling based on sources array length - Remove old Python effect files (migrated to sexp) - Update sexp effects to use namespaced primitives Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
24 lines
1.0 KiB
Common Lisp
24 lines
1.0 KiB
Common Lisp
;; Neon Glow effect - glowing edge effect
|
|
(require-primitives "image" "blending")
|
|
|
|
(define-effect neon_glow
|
|
:params (
|
|
(edge_low :type int :default 50 :range [10 200])
|
|
(edge_high :type int :default 150 :range [50 300])
|
|
(glow_radius :type int :default 15 :range [1 50])
|
|
(glow_intensity :type int :default 2 :range [0.5 5])
|
|
(background :type float :default 0.3 :range [0 1])
|
|
)
|
|
(let* ((edge-img (image:edge-detect frame edge_low edge_high))
|
|
(glow (image:blur edge-img glow_radius))
|
|
;; Intensify the glow
|
|
(bright-glow (map-pixels glow
|
|
(lambda (x y c)
|
|
(rgb (clamp (* (red c) glow_intensity) 0 255)
|
|
(clamp (* (green c) glow_intensity) 0 255)
|
|
(clamp (* (blue c) glow_intensity) 0 255))))))
|
|
(blending:blend-mode (blending:blend-images frame (make-image (image:width frame) (image:height frame) (list 0 0 0))
|
|
(- 1 background))
|
|
bright-glow
|
|
"screen")))
|