Builtin Library
README.md
fluidSurface
Screen-space fluid surfaces for GPU particle sims. Attach a named compute buffer of particle records (fluidSurface.attach) and the engine renders it as a continuous liquid every frame: splat passes rasterize every particle as a velocity-stretched billboard into depth / thickness / color buffers, a separable narrow-range filter fuses particles into a smooth surface while keeping silhouettes crisp, and a post-process composite shades the result with scene-color refraction, Beer–Lambert absorption from the per-pixel liquid color, Fresnel sky pickup, sun specular, and a foam layer — depth-tested against the scene. Everything runs at a configurable fraction of the screen resolution and the particle data never leaves the GPU, so hundreds of thousands of particles render as fluid in a few milliseconds. update patches count/radius/sun/shading live; detach frees every resource the surface owns.