Show HN: Metal.graphics – Metal shaders course for SwiftUI

1 vbaro 1 8/28/2025, 7:00:51 AM metal.graphics ↗
A couple of years ago, when Apple added Metal shader support to SwiftUI (iOS 17), I tried to learn shaders. Most resources I found were either too academic (assuming graphics background) or just showed cool effects without explaining how they worked. I wanted something that built intuition step by step.

So I started taking notes. Those notes turned into a structured guide, and eventually into a full course — which I’ve now put online for free.

The course walks through shaders from first principles: - How shaders plug into SwiftUI (.colorEffect, .distortionEffect, .layerEffect) - Coordinate systems and why UV space matters - Colors as vectors (RGB/HSV, blending, interpolation) - Functions like sin, fract, and smoothstep that show up everywhere - Procedural patterns, randomness/noise, distance fields - Animation, texture sampling, performance, accessibility

Each chapter builds on the previous one, includes SwiftUI-ready code, and ends with challenges (honestly, the challenges were for me the best part to learn). There’s also an optional paid Xcode project with all the working shaders, but the course itself is free.

A side note: I didn’t write this by pasting prompts into an AI and spitting out chapters. I learned the material by using Claude as a study partner — asking it to explain formulas, clarify artifacts I saw, or come up with challenges based on my notes. That iterative back-and-forth helped me actually understand the math instead of copying code blindly.

If you’ve ever been curious about shaders but found the material intimidating, this is meant to be an approachable path in. Would love feedback — both on the course itself and on how others have used AI as a learning tool rather than just a code generator.

PS: iOS Dev Weekly featured the course recently, which was very encouraging.

Comments (1)

vbaro · 14h ago
For those who already have some Metal experience, I’ve also been writing shorter, hands-on shader tutorials on Medium as I build more examples: https://medium.com/@victorbaro