A hands-on series covering Apple’s Metal GPU API in Swift — from a single triangle to a fully GPU-driven deferred renderer.

Each tutorial builds on the previous one. All source code is on GitHub.

Tutorials

  1. Preparation Project setup, Xcode, and the SwiftUI–Metal application structure.
  2. Hello Triangle Metal device, pipeline state, vertex and fragment shaders, and the render loop.
  3. Sample Object Buffers, vertex descriptors, Model I/O, uniforms, depth, and GGX shading.
  4. Deferred Rendering G-buffer attachments, multiple render targets, and a separate lighting pass.
  5. Shadows Shadow maps, depth textures, percentage-closer filtering, and bias.
  6. Tiled Rendering Apple Silicon TBDR, memoryless attachments, and tile shaders.
  7. GPU Rendering Indirect command buffers, argument buffers, heaps, and GPU-generated draws.