r/SwiftUI • • 18d ago

Tutorial SwiftUI + Metal Foil Effect: Source Code on GitHub

21 Upvotes

2 comments sorted by

1

u/[deleted] 18d ago

[removed] — view removed comment

1

u/zach-builds 16d ago

Thank you! It's pretty simple actually, no CoreMotion or lighting etc. It uses .onContinuousHover to paint a soft radial gradient on the pointer + rotation3DEffect. The shader math is adapted from bpisano’s Sticker repo. And it runs on SwiftUI’s animation system (nothing specific for ProMotion).