diff --git a/resources/com/pfeodrippe/vybe/shaders/mixer.fs b/resources/com/pfeodrippe/vybe/shaders/mixer.fs index 740185f..465c3a8 100644 --- a/resources/com/pfeodrippe/vybe/shaders/mixer.fs +++ b/resources/com/pfeodrippe/vybe/shaders/mixer.fs @@ -39,11 +39,11 @@ bool fill_blob(vec2 st) { trigger = true; } - // Square. - // if (st.x - 0.5 < 0.25 * u_fill && st.y - 0.5 < 0.25 * u_fill && - // st.x - 0.5 > -0.25 * u_fill && st.y - 0.5 > -0.25 * u_fill) { - // trigger = true; - // } + //Square. + /*if (st.x - 0.5 < 0.25 * u_fill && st.y - 0.5 < 0.25 * u_fill && + st.x - 0.5 > -0.25 * u_fill && st.y - 0.5 > -0.25 * u_fill) { + trigger = true; + }*/ /* if ((sin(st.x + cos(u_time*0.532) * 0.05) - c) * (sin(st.x + cos(u_time*0.3) * 0.04) - c) + @@ -62,15 +62,11 @@ bool fill_blob(vec2 st) { */ // dots - /* - if ((st.x - c) * (st.x - c) + (st.y - c) * (st.y - c) < r/5.0) { + /*if ((st.x - c) * (st.x - c) + (st.y - c) * (st.y - c) < r/5.0) { if (sin(st.y*99999.0) > 0.0001 && cos(st.x*100000.0) > 0.0001) { trigger = true; - } else { - trigger = false; } - } - */ + }*/ return trigger; } diff --git a/src/vybe/game/system.clj b/src/vybe/game/system.clj index bb54f6c..92939fc 100644 --- a/src/vybe/game/system.clj +++ b/src/vybe/game/system.clj @@ -286,26 +286,26 @@ (assoc-in [:rotation] rotation))) ;; -- Audio. -(defn- -ambisonic - [sound-source source-transform target-transform] - (let [d (vr.c/vector-3-distance - (vm/matrix->translation target-transform) - (vm/matrix->translation source-transform)) - [azim elev] (let [{:keys [x y z] :as _v} (-> source-transform - (vr.c/matrix-multiply (vr.c/matrix-invert target-transform)) - vm/matrix->translation)] - (if (> z 0) - [(- (Math/atan2 x z)) - (Math/atan2 y z) - _v] - [(Math/atan2 x z) - (Math/atan2 y z) - _v])) - amp (if (zero? d) - 1 - (/ 1 (* d d)))] - (va/sound - (ctl sound-source :azim azim :elev elev :amp (* amp 100) :distance d)))) +#_(defn- -ambisonic + [sound-source source-transform target-transform] + (let [d (vr.c/vector-3-distance + (vm/matrix->translation target-transform) + (vm/matrix->translation source-transform)) + [azim elev] (let [{:keys [x y z] :as _v} (-> source-transform + (vr.c/matrix-multiply (vr.c/matrix-invert target-transform)) + vm/matrix->translation)] + (if (> z 0) + [(- (Math/atan2 x z)) + (Math/atan2 y z) + _v] + [(Math/atan2 x z) + (Math/atan2 y z) + _v])) + amp (if (zero? d) + 1 + (/ 1 (* d d)))] + (va/sound + (ctl sound-source :azim azim :elev elev :amp (* amp 100) :distance d)))) #_(defsynth ks1 [note {:default 60 :min 10 :max 120 :step 1} diff --git a/todo.md b/todo.md index 3253d1e..724fa15 100644 --- a/todo.md +++ b/todo.md @@ -235,8 +235,8 @@ - [x] ecs_query_get - [x] physics - [x] trigger event when touching -- [ ] passthrough render - - [ ] shader +- [x] passthrough render + - [x] shader - [x] portion of the window - [x] only when cube clicked - [x] LPF when enabled @@ -245,10 +245,10 @@ - [x] disable/enable object - [x] render to another RT - [x] shader to mix the RTs - - [ ] transition from a blob - - [ ] square - - [ ] circle - - [ ] animate blob + - [x] transition from a blob + - [x] square + - [x] circle + - [x] animate blob - [ ] multiple worlds, render twice? - [ ] 2-player where you pass one object to the other? - [ ] 3d?