Files
rose-ash/test/sexp_effects/effects/invert.sexp
2026-02-24 23:10:04 +00:00

10 lines
337 B
Common Lisp

;; Invert effect - inverts all colors
;; Uses vectorized invert-img primitive for fast processing
;; amount param: 0 = no invert, 1 = full invert (threshold at 0.5)
(require-primitives "color_ops")
(define-effect invert
:params ((amount :type float :default 1 :range [0 1]))
(if (> amount 0.5) (color_ops:invert-img frame) frame))