Interactive WebGL Experience

Feel the Liquid Flow

Explore a mesmerizing world of fluid dynamics rendered in real-time. Move your cursor to interact with the liquid simulation powered by WebGL shaders.

0FPS Smooth Render
0% GPU Powered
0+ Fluid Blobs
Scroll to explore

Powered by Advanced Tech

Built with cutting-edge WebGL technology for stunning real-time liquid simulations.

WebGL Shaders

Fragment shaders run directly on the GPU, enabling smooth and complex liquid simulations at 60fps.

Metaball Algorithm

Organic blob merging using mathematical metaball functions creates realistic fluid behavior.

Interactive

Mouse tracking creates a responsive blob that follows your cursor in real-time, blending with the animation.

Responsive

Automatically adapts to any screen size while maintaining smooth performance across all devices.

The Science Behind Liquid Art

This animation uses a metaball algorithm implemented as a WebGL fragment shader. Multiple invisible spheres (blobs) float across the canvas. For every pixel on screen, the shader calculates the influence of each blob based on its distance.

When blobs get close enough, their influence fields overlap and merge — creating the characteristic "liquid merging" effect. The colors are generated dynamically using HSL color space, producing smooth rainbow-like gradients.

WebGL 1.0 GLSL Shaders Metaballs GPU Rendering requestAnimationFrame
fragment.glsl
float metaball(vec2 p, vec2 center, float r) {
    float d = distance(p, center);
    return (r * r) / (d * d);
}

// Sum influence of all blobs
float total = 0.0;
for(int i = 0; i < NUM_BLOBS; i++) {
    total += metaball(uv, blobs[i], radii[i]);
}

// Apply threshold → liquid surface
if(total > 1.0) {
    gl_FragColor = mix(color1, color2, total);
}

Ready to Create Something Beautiful?

Explore the source code and build your own liquid animations. Open source and free to use.