Liquid Metal, a Metal shader for SwiftUI
SwiftUI Metal shader

Liquid Metal

Three metaball droplets fuse and part inside a glass sphere hanging in a studio void. The view ray refracts at the shell — once per channel at three IORs, so the background disperses — then marches forty steps to the metal, which is shaded as a mirror: the room re-sampled along the reflected direction, three specular lobes off one key light, an iridescent band and a low bounce. Every colour on screen is a swatch, down to the wall, the two lamps and both ends of the iridescent band.

SwiftUIReact NativeWeb

How it works

Liquid Metal 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, or the React Native and Web version. No MSL to write.

29 settings you can tune

  • Speed
  • Radius
  • Droplets
  • Merge
  • Ripple
  • Iridescence
  • Tint
  • Metal
  • Sheen
  • Bloom
  • Bounce
  • Wall
  • Wall tint
  • Lamp
  • Lamp 2
  • Specular
  • Softbox
  • Glint
  • Edge
  • Rim
  • Key
  • Band
  • Band tint
  • Fresnel
  • Exposure
  • Colors
  • Edge softness
  • Glow
  • Glow tint

More SwiftUI shaders