Mac Metal Update

If your Mac isn't Metal-compatible, that doesn't mean it can't run OS X El Capitan. Apple said all Macs that support OS X Yosemite can upgrade to El Capitan. Here's which Macs will be OS X El. Metal was introduced in OS X El Capitan, so as long as you’ve updated your Mac’s software in the past couple of years, you should be good. Generally speaking, any MacBook released in 2015 or later.

Featured
  • Modern Rendering with Metal

    Render a complex scene with the latest rendering techniques and effects. This sample uses advanced Metal features, such as indirect command buffers, sparse textures, and variable rate rasterization, to implement rendering algorithms that use GPU based mesh culling, tile based deferred lighting, ambient occlusion, volumetric fog, and cascaded shadow maps.

    macOS iOS

    View sample code
  • Animating and Denoising a Raytraced Scene

    Render and denoise a dynamic scenes in your ray tracer with Metal Performance Shaders.

    macOS iOS

    View sample code
  • Creating a Custom Metal View

    Create a custom Metal view by interacting directly with CoreAnimation to obtain drawable textures. Control rendering on the main thread or secondary thread. Execute rendering in a loop in-sync with the display or render only in response to a system event.

    macOS iOS tvOS

    View sample code
  • Calculating Primitive Visibility Using Depth Testing

    Understand how to use depth testing, a fundamental operation for rendering 3D scenes. This sample draws geometry with varying depth values allowing Metal to remove pixels in triangles obscured by other triangles.

    macOS iOS

    View sample code
  • Customizing Render Pass Setup

    Create a custom render command encoder using a render pass descriptor. This sample renders to an offscreen texture by setting up its own render pass descriptor rather than depending on one provided by a MTKView.

    macOS iOStVOS

    View sample code
Metal Fundamentals
  • Performing Calculations on a GPU

    Use Metal to issue data parallel calculations to the GPU. This sample shows how to obtain a Metal device, create simple buffer resources, and execute a basic compute kernel.

    macOS

    View sample code
  • Using Metal to Draw a View’s Contents

    See how to use Metal for setup and rendering. This sample shows how to configure a MetalKit view, setup Metal for rendering, and display rendered content.

    macOS iOS tvOS

    View sample code
  • Using a Render Pipeline to Render Primitives

    Render simple geometry in Metal. This sample shows how to work with vertex data and SIMD types, configure a graphics rendering pipeline, write GPU functions, and issue draw calls.

    macOS iOS tvOS

    View sample code
  • Creating and Sampling Textures

    Use simple texturing with Metal. This sample shows how to configure texture properties, interpret texture coordinates, and access a texture in a fragment function to display a 2D image.

    macOS iOS tvOS

    View sample code
  • Calculating Primitive Visibility Using Depth Testing

    Understand how to use depth testing, a fundamental operation for rendering 3D scenes. This sample draws geometry with varying depth values allowing Metal to remove pixels in triangles obscured by other triangles.

    macOS iOS

    View sample code
  • Synchronizing CPU and GPU Work

    Efficiently update and render animated resources while sharing them between the CPU and the GPU. This sample shows how to modify data each frame, avoid data access issues, and execute CPU and GPU work in parallel.

    macOS iOS tvOS

    View sample code
  • Customizing Render Pass Setup

    Create a custom render command encoder using a render pass descriptor. This sample renders to an offscreen texture by setting up its own render pass descriptor rather than depending on one provided by a MTKView.

    macOS iOStVOS

    View sample code
  • Basic Argument Buffers

    Use a simple argument buffer to store references to Metal resources. This sample shows how to encode textures, buffers, samplers and constant values into a Metal buffer and access these in a shader for rendering.

    macOS iOS tvOS

    View sample code
  • Argument Buffers with Arrays and Resource Heaps

    Reduce CPU overhead and improve performance by using a heap to store resources set in an argument buffer. This sample shows how to define an argument buffer structure that contains arrays and how to allocate and use resources from a heap.

    macOS iOS tvOS

    View sample code
  • Argument Buffers with GPU Encoding

    Use the GPU to encode a rendering pass for even better performance using an argument buffer. This sample shows how to write data into the argument buffer from a compute kernel and accessing it in a subsequent render pass.

    macOS

    View sample code
  • Encoding Indirect Command Buffers on the CPU

    Create an indirect command buffer and encode commands using the CPU. This sample shows how to efficiently render many varying objects repeatedly using an indirect command buffer.

    macOS iOS

    View sample code
  • Encoding Indirect Command Buffers on the GPU

    Dynamically encode rendering commands using the GPU. This sample uses a simple culling algorithm to select objects in a compute kernel and increase rendering efficiency by drawing only those that are visible.

    macOS iOS

    View sample code
  • Basic Tesselation

    Tessellate a triangle or quad patch with adjustable per-patch tessellation factors. This sample allows the user to control the number of triangles that make up a patch and visualize the geometry produced.

    macOS

    View sample code
Metal Integration
  • Creating a Custom Metal View

    Create a custom Metal view by interacting directly with CoreAnimation to obtain drawable textures. Control rendering on the main thread or secondary thread. Execute rendering in a loop in-sync with the display or render only in response to a system event.

    macOS iOS tvOS

    View sample code
  • Device Selection and Fallback for Graphics Rendering

    Choose the best GPU for rendering or display and respond to the addition and removal of an eGPU or external display. This sample sets up rendering on multiple GPUs and enables seamless switching between them.

    macOS

    View sample code
  • Device Selection and Fallback for Compute Processing

    Utilize the additional computational power of a second GPU and transfer data it produces to your application. This sample executes a computation intensive N-body simulation on one GPU while continually transferring data to the primary GPU for rendering.

    macOS

    View sample code
  • Migrating OpenGL Code to Metal

    See how to replace your app’s OpenGL code with Metal. This sample shows how shaders, renderable textures, and buffers work with Metal by comparing them with common OpenGL and OpenGL ES rendering constructs.

    macOS iOS

    View sample code
  • Mixing Metal and OpenGL Rendering in a View

    To assist in porting your application to Metal, learn how to incrementally transition your application's rendering from OpenGL. This application passes rendered content between textures managed by Metal and OpenGL.

    macOS iOS

    View sample code
  • Capturing Metal Commands Programmatically

    Debug your rendering by invoking Metal’s frame capture from within your app. Save the resulting GPU trace to a file or view it in Xcode to explore the Metal commands produced by your app.

    macOS

    View sample code
  • Supporting Simulator in a Metal App

    Learn how to run your Metal app on the iOS simulator while continuing to use Metal features only available on iOS devices.

    macOS iOS

    View sample code
Advanced Techniques
  • Modern Rendering with Metal

    Render a complex scene with the latest rendering techniques and effects. This sample uses advanced Metal features, such as indirect command buffers, sparse textures, and variable rate rasterization, to implement rendering algorithms that use GPU based mesh culling, tile based deferred lighting, ambient occlusion, volumetric fog, and cascaded shadow maps.

    macOS iOS

    View sample code
  • LOD with Function Specialization

    Use Metal function constants to reduce the amount of shader code by creating multiple executable versions from a single source function. This sample demonstrates dynamic level of detail (LOD) selection for a model without needing separate shaders for each level of detail.

    macOS iOS tvOS

    View sample code
  • Reflections with Layer Section

    Render to a cubemap by selecting faces in a vertex shader. This sample demonstrates dynamic reflections on a chrome sphere, using layer selection to render the frame in two passes.

    macOS iOS

    View sample code
  • Deferred Lighting

    See how to implement efficient deferred lighting renderer with Metal. This sample makes use of the unique features available to the A-Series GPUs including programmable blending and memoryless textures. It also implements a more standard deferred lighting renderer for macOS.

    macOS iOS tvOS

    View sample code
  • Dynamic Terrain with Argument Buffers

    Use argument buffers to implement a dynamic environment. This sample generates on an outdoor landscape, using argument buffers to select terrain materials, vegetation geometry, and particle effects within a GPU-driven pipeline

    macOS iOS tvOS

    View sample code
  • Forward Plus Lighting with Tile Shading

    Use a tile shader to accelerate a key parts of a forward plus renderer. This sample executes a tile shader to sort light volumes and direct fragment lighting calculations only to lights affecting each tile.

    iOS

    View sample code
  • Image Filter Graph with Heaps and Fences

    Reduce the memory usage of your application by allocating resources from a heap and perform explicit hazard tracking. This sample implements a multistage image filter which efficiently reuses memory from the heap for different tasks during processing.

    macOS iOS tvOS

    View sample code
  • Image Filter Graph with Heaps and Events

    Use events to synchronize GPU operations and reduce memory usage. This sample demonstrates an alternative to using fences in implementing a multistage image filter.

    macOS iOS tvOS

    View sample code
  • Metal for Accelerating Ray Tracing

    Use the ray-intersector functionality available in the Metal Performance Shaders framework to accelerate a path-traced renderer. This sample demonstrates how to cast primary, secondary, and shadow rays in a scene to simulate realistic lighting effects.

    macOS iOS

    View sample code
  • Animating and Denoising a Raytraced Scene

    Render and denoise a dynamic scenes in your ray tracer with Metal Performance Shaders.

    macOS iOS

    View sample code

Accelerating graphics and much more.

Mac Metal Update Software

Metal provides near-direct access to the graphics processing unit (GPU), enabling you to maximize the graphics and compute potential of your apps on iOS, macOS, and tvOS. Building on an approachable, low-overhead architecture with precompiled GPU shaders, fine-grained resource control, and multithreading support, Metal further evolves support for GPU-driven command creation, simplifies working with the array of Metal-capable GPUs, and lets you tap into Pro power of Mac Pro and Pro Display XDR.

GPU-driven Compute Encoding

Moving beyond just rendering passes, Metal in iOS 13 and tvOS 13 empowers the GPU to construct its own compute commands with Indirect Compute Encoding. Now complete scenes using advanced culling and tessellation techniques can be built and scheduled with little or no CPU interaction.

Improved Raytracing Acceleration

Metal Performance Shaders (MPS) speed raytracing operations even more by moving the bounded volume hierarchy construction to the GPU. MPS also provide new, optimized de-noising filters in an essential collection of highly-optimized compute and graphics shaders.

Metal for Pro Apps

Professional content-creation apps can take advantage of outstanding enhancements in Metal on macOS Catalina. Metal Peer Groups make it easy to rapidly share data between multiple GPUs in Mac Pro without transferring through main memory. And enhancements to CAMetalLayer give you access to the High Dynamic Range capabilities of Pro Display XDR.

Mac Metal Update Settings

Simpler GPU Families

Mac metal update software

Developing with Metal is even easier with the dramatically simplified GPU Families. Three well-considered groupings allow you to easily target functionality that's common across all Metal-enabled GPUs, access unique capabilities of Apple-designed GPUs, and better harness supported third-party GPUs on macOS.

Metal Memory Debugger

Mac Metal Wisconsin

The Metal Memory Debugger gives fine-grained insight into how much memory Metal objects and rendering resources consume at runtime. It also analyzes how your resources are configured and suggests improvements, so you can deeply optimize your game or app to take full advantage of Metal.

Metal-enabled iOS Simulator

The Simulator now uses Metal to speed up the development of iOS apps that either use Metal directly or rely on Metal-based system frameworks. This is perfect for smoothly transitioning from OpenGL ES to Metal.

  • What’s New in Metal

    Tools for Windows
    The Metal Developer Tools for Windows enables Metal Shading Language (MSL) compilation on Windows into Metal Library Objects targeting Apple platforms.

  • Documentation

    Browse the latest documentation including API reference and articles.

  • Sample Code

    Get sample code to see how Metal APIs are implemented.

  • Videos

    Learn how to take advantage of the latest advancements in Metal.

  • Forums

    Ask questions and discuss Metal with Apple engineers and other developers.