                    (<! (events/next-frame))))
 
 
+;;
+;; experimental shaders
+;;
+
+#_ (deftype TestFilter [passes shaders dirty padding uniforms fragmentSrc]
+  PIXI/AbstractFilter)
+
+(defn make-test []
+  (let [f
+        (PIXI/AbstractFilter.
+         #js [
+              "
+precision mediump float;
+varying vec2 vTextureCoord;
+varying vec4 vColor;
+uniform sampler2D uSampler;
+uniform float time;
+
+float hash2(vec2 uv) {
+    return fract(sin(uv.x * 15.78 + uv.y * 35.14) * 43758.23);
+}
+
+void main( void ) {
+    vec4 col = texture2D(uSampler, vTextureCoord);
+
+    float r=col.r;
+    float g=col.g;
+    float b=col.b;
+
+    // magenta?
+    bool mag = ((r-b)<0.1) && r>0.1;
+
+    if(mag)
+    {
+         //gl_FragColor = vec4(vTextureCoord.x, vTextureCoord.y, 0.5, 1.0);
+         float c = hash2(gl_FragCoord.xy * time);
+         gl_FragColor = vec4(c,c,c,1.0) * r;
+    }
+    else
+    {
+        //gl_FragColor = vec4(hash2(gl_FragCoord.xy * time), time, 0.0, 0.3);
+        gl_FragColor = col; //vec4(0.0,0.0,0.0,0.0);
+    }
+}
+"]
+         #js {"time" #js {"type" "1f" "value" 0.0}})]
+    (go
+      (loop [frame 0]
+        (<! (events/next-frame))
+        (set! (.-uniforms.time.value f) (/ frame 1000))
+        (recur (inc frame))))
+    f))
+
+
 (defn main []
   (go
+    ;; load assets with loader bar
     (<! (resources/load-resources
          (-> canvas :layer :ui)
          [


)

(defonce render! (go
                   (<! (events/wait-time 1500))
                   (sprite/set-pos! dummy-text -100000 -10000)

                       (inc c)
                       ))))

        ;; wait forever
        (loop []
          (<! (events/next-frame))
          (recur))))))

(main)
