;; hackpact day 22 - ffglcifilters ;; gabor papp http://mndl.hu/hackpact (clear) (scale #(20 16 1)) (translate #(-.5 -.5 0)) (define s 256) (define px0 (build-pixels s s)) (define p0 (ffgl-load "cilenticularhalogenerator" 256 256)) (with-ffgl p0 (ffgl-process px0)) (translate #(1 0 0)) (define px1 (build-pixels s s)) (define p1 (ffgl-load "cilinescreen" 256 256)) (with-ffgl p1 (ffgl-process px1 px0)) (translate #(1 0 0)) (define px2 (build-pixels s s)) (define p2 (ffgl-load "cisixfoldrotatedtile" 256 256)) (with-ffgl p2 (ffgl-process px2 px1)) (every-frame (begin (with-ffgl p2 (ffgl-set-parameter! #:angle (+ .5 (* .5 (sin (* .03 (time))))))) (with-ffgl p1 (ffgl-set-parameter! #:angle (+ .5 (* .5 (cos (* .1 (time))))))) (with-ffgl p0 (ffgl-set-parameter! #:time (time) #:color-r 1.0 #:color-g 1.0 #:color-b 1.0 #:halo-radius 0.01 #:halo-width (+ .3 (* .2 (sin (time)))) #:center-x (/ (mouse-x) (vx (get-screen-size))) #:center-y (- 1 (/ (mouse-y) (vy (get-screen-size)))) #:halo-overlap (+ .9 (* .1 (sin (time)))) #:striation-contr 1 #:striation-stren .1))))