Fluid, a Metal shader for SwiftUI
SwiftUI Metal shader

Fluid

A real Navier–Stokes fluid you can touch — drag across the preview to stir glowing dye through vorticity, a Jacobi pressure solve and a bloom chain. Exports a self-contained MetalKit renderer.

SwiftUI

How it works

Fluid is a real [[stitchable]] Metal shader, not a video or an image. It runs as a SwiftUI .colorEffect, so it paints any view you attach it to. You shape it with sliders in a live preview, then export the .metal file and the SwiftUI code that uses it. No MSL to write.

16 settings you can tune

  • Style
  • Swirl
  • Fade
  • Friction
  • Pressure
  • Splat size
  • Splat force
  • Auto splats
  • Rainbow
  • Dye
  • Variety
  • Brightness
  • Shading
  • Bloom
  • Glow
  • Glow cutoff

More SwiftUI shaders