Apple Metal: From Fundamentals to Practice — book cover
A book for graphics & systems developers

Apple Metal: From Fundamentals to Practice

From fundamentals to practice — a hands-on guide to Apple's GPU framework. Buffers, textures, and shaders; the render pipeline and compute; and the tools that capture, profile, and diagnose a real frame.

A look inside

Diagrams, real code, and deep dives

Every concept is illustrated — the GPU pipeline drawn out step by step — and paired with complete, runnable Metal and MSL code you can drop straight into a project. Each article goes deep: not just which API to call, but what the hardware actually does with it. These are real pages, in light and dark.

Table of contents

All 25 articles

One throughline in two parts. Part I — Metal Fundamentals takes you from your first command buffer to a full pipeline on screen. Part II — Tools & Diagnostics — the half most Metal books skip — is how you read a frame like a profiler and make it fast.

Part I · Metal Fundamentals
1Foundations
  • 1.1 · What is Apple MetalWhy Metal exists and where it sits among Apple's GPU APIs.
  • 1.2 · Metal ArchitectureHow the framework's objects map onto the GPU and its command flow.
  • 1.3 · Metal Shading Language FreeWriting GPU code in MSL — and rendering your first frame. Read it now →
2Core Resources
  • 2.1 · BuffersPacking vertex and uniform data into MTLBuffers for the GPU.
  • 2.2 · TexturesCreating, sampling, and choosing formats for image data.
  • 2.3 · Blit OperationsCopying and transforming GPU resources with the blit encoder.
3Rendering and Compute
  • 3.1 · What's Under the HoodWhat actually happens on the GPU when a draw call runs.
  • 3.2 · Render PipelineAssembling the render pipeline state, passes, and attachments.
  • 3.3 · ShadersVertex and fragment shaders that turn geometry into pixels.
  • 3.4 · ComputingCompute kernels and dispatching parallel work on the GPU.
4Advanced APIs
  • 4.1 · Metal Performance ShadersApple's tuned image, matrix, and neural-network primitives.
  • 4.2 · MPSGraphExpressing GPU compute and ML as a high-level graph.
  • 4.3 · Metal Stitchable FunctionsComposing shader functions dynamically at runtime.
5UI Integration
  • 5.1 · UIKit and Core AnimationHosting a Metal layer inside a UIKit / Core Animation app.
  • 5.2 · SwiftUI FreeDriving Metal rendering from SwiftUI — MTKView and MetalView in a SwiftUI app. Read it now →
Part II · Tools & Diagnostics
6Setup and Baselines
  • 6.1 · DocumentationFinding the documentation and references that actually matter.
  • 6.2 · Basic DiagnosticsFirst-line checks, API validation, and shader warnings.
  • 6.3 · Devices and SimulatorsHow behaviour differs across real devices and the simulator.
7GPU Frame Capture
  • 7.1 · Frame Capture: UI FreeCapturing a frame straight from Xcode's interface. Read it now →
  • 7.2 · Frame Capture: Code ControlTriggering captures programmatically from your own code.
  • 7.3 · ProfilingReading GPU counters and timings to find the bottleneck.
  • 7.4 · Frame Capture: DebuggingInspecting bound resources, geometry, and shader values.
8Tracing and Manual Diagnostics
  • 8.1 · Metal System TraceProfiling the whole pipeline with Metal System Trace.
  • 8.2 · Manual Diagnostics: Value-LevelReading intermediate values straight out of a shader.
  • 8.3 · Manual Diagnostics: Tooling-LevelBuilding your own instrumentation when the tools fall short.
Buy $50
The format

A book built for every screen

A modern web book you read right in the browser — no app to install, nothing to download. A few things make it comfortable to read:

The Metal book open on a laptop, tablet, and phone, laid out responsively for each screen size.
Start reading
Apple Metal · From Fundamentals to Practice

Two parts · 8 chapters · 25 illustrated articles — Metal Fundamentals and Tools & Diagnostics. Lifetime access, including future revisions.

  • One-time purchase unlocks the book for the email you check out with.
  • An all-access subscription unlocks every paid book on bookshelf.dev — current and future.
  • Payments handled by our Merchant of Record.