   [x]
   `(cliskf/vif ~x [0 0 0] [1 1 1]))
 
+(defmacro v>
+  [x y]
+  `(cliskf/vif (cliskf/v+ (invert ~x) ~y) [1 1 1] [0 0 0]))
+
 (defn init-ocean
   []
   (let [max-x 80

                {:type :water}))))
      [])))


(def island-node
  (cliskf/vectorize

        ;; interior biomes
        (cliskf/v+ [-0.55 -0.55 -0.55]  c)
          (vcond
            (vand c1 c2 (v> c1 c2))
            ;; interior jungle
            jungle
            (vand c1 c2)
            heavy-forest
            (vand c1 (vnot c2) (v> c1 c2))
            light-forest
            (vand c1 (vnot c2))
            bamboo-grove
            (vand (vnot c1) c2 (v> c1 c2))
            meadow
            (vand (vnot c1) c2)
            rocky
            (vand (vnot c1) (vnot c2) (v> c1 c2))
            swamp
            (vnot (vand c1 c2))
            dirt)
        ;; shore/yellow
        (cliskf/v+ [-0.5 -0.5 -0.5]  c)
            sand
        ;; surf/light blue
        (cliskf/v+ [-0.42 -0.42 -0.42]  c)
          surf
        ;; else ocean
        [1 1 1]
          ocean))))

(def island-fns
  (vec (map cliskn/compile-fn (:nodes island-node))))
