Sweep, a Metal shader for SwiftUI
SwiftUI Metal shader

Sweep

A magenta light rising out of the card's lower corner through a violet field, with a second lobe holding the right edge. Drag the light on the canvas to move it.

SwiftUIReact NativeWeb

How it works

Sweep 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

  • Card Size
  • Corner Radius
  • Light
  • Intensity
  • Spread
  • Wobble
  • Scrim
  • Background
  • Core
  • Mid
  • Outer
  • Base
  • Lobe
  • Shadow
  • Shadow Tint
  • Filter
  • Amount
  • Scale
  • Radius
  • Fade
  • Softness
  • Rotation
  • Grain
  • Brightness
  • Contrast
  • Saturation
  • Rounding
  • Bevel
  • Inset

More SwiftUI shaders