Files
mono/artdag/l1/test_autonomous.sexp
giles 1a74d811f7 Incorporate art-dag-mono repo into artdag/ subfolder
Merges full history from art-dag/mono.git into the monorepo
under the artdag/ directory. Contains: core (DAG engine),
l1 (Celery rendering server), l2 (ActivityPub registry),
common (shared templates/middleware), client (CLI), test (e2e).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

git-subtree-dir: artdag
git-subtree-mainline: 1a179de547
git-subtree-split: 4c2e716558
2026-02-27 09:07:23 +00:00

37 lines
1.2 KiB
Common Lisp

;; Autonomous Pipeline Test
;;
;; Uses the autonomous-pipeline primitive which computes ALL parameters
;; on GPU - including sin/cos expressions. Zero Python in the hot path!
(stream "autonomous_test"
:fps 30
:width 1920
:height 1080
:seed 42
;; Load primitives
(require-primitives "streaming_gpu")
(require-primitives "image")
;; Effects pipeline (what effects to apply)
(def effects
[{:op "rotate" :angle 0}
{:op "hue_shift" :degrees 30}
{:op "ripple" :amplitude 15 :frequency 10 :decay 2 :phase 0 :center_x 960 :center_y 540}
{:op "brightness" :factor 1.0}])
;; Dynamic expressions (computed on GPU!)
;; These use CUDA syntax: sinf(), cosf(), t (time), frame_num
(def expressions
{:rotate_angle "t * 30.0f"
:ripple_phase "t * 2.0f"
:brightness_factor "0.8f + 0.4f * sinf(t * 2.0f)"})
;; Frame pipeline - creates image ON GPU and applies autonomous pipeline
(frame
(let [;; Create base image ON GPU (no CPU involvement!)
base (streaming_gpu:gpu-make-image 1920 1080 [128 100 200])]
;; Apply autonomous pipeline - ALL EFFECTS + ALL MATH ON GPU!
(streaming_gpu:autonomous-pipeline base effects expressions frame-num 30.0))))