Skip Navigation
Framework

Metal

Render advanced 3D graphics and compute data in parallel with graphics processors.

Overview

The Metal framework gives your app direct access to a device’s graphics processing unit (GPU). With Metal, apps can leverage a GPU to quickly render complex scenes and run computational tasks in parallel. For example, apps in these categories use Metal to maximize their performance:

  • Games that render sophisticated 2D or 3D environments

  • Video processing apps, like Final Cut Pro

  • Scientific research apps that analyze and process large datasets

  • Fully immersive visionOS apps

Metal works hand-in-hand with other frameworks that supplement its capability. For example, MetalFX upscales your renderings in less time than rendering them natively, and MetalKit simplifies the tasks that display your Metal content onscreen. The Metal Performance Shaders framework provides a large library of optimized compute and rendering shaders that take advantage of each GPU’s unique hardware. In visionOS, create fully immersive stereoscopic content with the help of the Compositor Services framework.

Many high-level Apple frameworks leverage the performance of Metal, including RealityKit, SceneKit, SpriteKit, and Core Image. These high-level frameworks implement the GPU programming details for you. However, you can typically get better performance by writing your own custom Metal and shader code. See the Metal Shading Language Specification for shader implementation details.

Topics

Begin with the samples that demonstrate the fundamentals of Metal.
Discover graphics techniques and Metal features through sample code projects.
Start with a Metal device instance to begin working with the GPU it represents.
Send work to a GPU by issuing commands and configuring the pipeline states for those commands.
Store data in buffers and textures, and optionally manage the underlying GPU memory yourself.
Write and organize shaders, the functions that work on a GPU’s execution units.
Present your rendered content on a device’s display with Core Animation or MetalKit, in standard or high dynamic range.
Configure windows and text to display correctly on all devices.
Identify and fix issues with your app’s Metal API calls, shader code, resources, and performance during development by using Metal Debugger.
Take advantage of the unique architecture of Apple silicon GPUs.
Current page is Metal