New effect family "Fluido": real-time GPU fluid simulation (ink-in-water)

Stable-fluids solver (fluid.js) on ping-pong half-float framebuffers:
semi-Lagrangian advection, vorticity confinement (clamped — unbounded
confinement overflows half-float and kills the field), 22 Jacobi pressure
iterations, audio-driven dye/force splats. Three wandering emitters inject
palette-coloured dye (brightness-normalized so dark palette entries stay
vivid); bass drives injection and stirring, beats fire directional bursts,
treble adds swirl. Universal modifiers map onto the sim: warp = vorticity,
speed = sim speed (brightness is speed-normalized), sym = kaleidoscope with
a wedge that rotates via rotSpeed, contrast/invert on display.

The Visualizer delegates to FluidSim when the preset has isFluid (flag is
always present so Object.assign merges can't leave it stale). 102 new
presets (17 palettes x 6 variants).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
lucianoandClaude Fable 5 committed 2026-07-17 14:48:38 +02:00
1 parent 7a79ade428
commit 14afe0b98c
4 files changed
+409 -2

No files matched your search

+5
View File
@@ -94,6 +94,11 @@ class Visualizer {
render(timeSec, audio) {
const gl = this.gl, u = this.u, e = this.effect;
if (e.isFluid && window.FluidSim) {
if (!this.fluid) this.fluid = new window.FluidSim(gl);
this.fluid.render(timeSec, audio, e, this.canvas);
return;
}
gl.useProgram(this.program);
gl.bindBuffer(gl.ARRAY_BUFFER, this.vbo);
gl.enableVertexAttribArray(this.aPos);