Nebula Orb, a Metal shader for SwiftUI
SwiftUI Metal shader

Nebula Orb

Warm billowing volume around an off-centre ember of a sun. The sphere is implicit — a disc whose z is solved from the radius — and marched front-to-back in eighteen slices, each one sampling two fbm fields (one warping the other) into a density that ramps through four palette stops. What the transmittance leaves lets the ember through.

SwiftUIReact NativeWeb

How it works

Nebula Orb 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.

23 settings you can tune

  • Speed
  • Radius
  • Density
  • Core
  • Core size
  • Rim strength
  • Deep
  • Mid
  • Flame
  • Hot
  • Ember
  • Halo
  • Halo tint
  • Ember glow
  • Ambient
  • Rim
  • Rim tint
  • Bloom
  • Exposure
  • Colors
  • Edge softness
  • Glow
  • Glow tint

More SwiftUI shaders