Skip to content

Uncategorized

What’s new in Metal at WWDC21

This year has been an incremental one for the Metal framework. The Metal Shading Language (MSL) is now at version 2.4, however, the GPU families and feature set tables are unchanged since last year, with the Apple7 GPU family including the M1 . Let’s get to all the exciting additions at WWDC21 and start with the new ray tracing features. Normally, you have a compute pass after each render pass… Read More »What’s new in Metal at WWDC21

WWDC20 – What’s new in Metal and the Apple GPU

WWDC20 has been an event of major changes. All operating systems had significant design changes. The new macOS named Big Sur is now version 11. The biggest announcement was the 2-yr plan for migrating from the Intel system on a chip (SoC) to the newly branded Apple Silicon SoC. The new SoC will replace the Intel integrated GPU with Apple’s own GPU in new upcoming Macs. There is no word yet on what will happen to the AMD discrete GPUs or whether eGPUs will… Read More »WWDC20 – What’s new in Metal and the Apple GPU

WWDC19 – Introducing Metal 2.2

Metal 2.2 was announced last week at WWDC 2019. Apple presented it along with relevant numbers: Metal can now make 100 times more draw calls than OpenGL. Metal runs on roughly 1.4 billion devices currently. Metal can drive up to 56 TFLOPS of single precision. Note: To get 56 TFLOPS, you need the new Mac Pro with dual Vega II Duo (4 GPUs). The Radeon Pro Vega II Duo is… Read More »WWDC19 – Introducing Metal 2.2

Introduction to compute using Metal

Compute, or GPGPU, in the world of GPU programming is another approach to programming the GPU besides rendering. Both approaches involve high parallelism on the GPU, the difference being the more granular control you have in compute over how threads are given work to do. This is useful in situations where you would want certain threads to work on one part of the problem and other threads on another part of… Read More »Introduction to compute using Metal

Using eGPUs with Metal

For those (like me) who need raw GPU power but only possess a laptop and do not want to buy a beefy desktop machine, the solution seems to be an external GPU (eGPU). While Nvidia eGPUs are not supported by macOS at the moment, there are plenty of GPU options from AMD. In looking for the perfect GPU, I stopped at none other than the AMD Radeon RX Vega 64 which is… Read More »Using eGPUs with Metal

Raytracing with Metal

This is going to be a really short post because of two reasons: This concept is explained by Apple really well in this documentation page. All I did was to port their code from Objective-C to Swift since I have not seen a Swift version to date. My book, Metal by Tutorials, will have an entire chapter dedicated to the Metal Performance Shaders framework and raytracing. In a nutshell, the Metal Performance Shaders framework now has a high performance intersector that helps speeding up… Read More »Raytracing with Metal

Metal By Tutorials book!

My book is out after almost 3 years since I started working on it! It was such an amazing journey we, the authors, took in writing the first ever Metal book for game engine developers. It took longer than I thought it would take to see it in print, but it was all worth the wait! :) Use this link https://store.raywenderlich.com/products/metal-by-tutorials if you want to purchase the book. For only a limited… Read More »Metal By Tutorials book!

Metal 2 on the A11 GPU

When the new A11-powered iPhone models (8, 8 Plus and X) were announced in the September Event keynote, the new GPU Family 4 webpage and a series of new Metal videos labeled Fall 2017were published. The new processor, called A11 Bionic, has the first Apple-designed GPU which comes with three cores. Internal tests state it is 30% faster than the previous GPU inside the A10. It also features a new Neural Engine hardware addition, for machine learning. Below is a table I made out of the Metal Feature Sets document. It… Read More »Metal 2 on the A11 GPU

Working with Particles in Metal part 3

Last time we looked at how to manipulate vertices from Model I/O objects on the GPU. In this part we are going to show yet another way to create particles using compute threads. We can reuse the playground from last time and we start by modifying the Particle struct in our metal view delegate class to only include two members that we will update on the GPU – position and velocity: We need neither the timer variable, nor the translate(by:) and update() methods anymore so you… Read More »Working with Particles in Metal part 3

Working with Particles in Metal part 2

Last time we looked at how to quickly prototype a particle-like object directly inside a shader, using distance functions. That was acceptable for moving an object based on time elapsed. However, if we want to work with vertices we would need to define the particles on the CPU and send the vertex data to the GPU. We use again a minimal playground we used in the past for 3D rendering, and we start by creating… Read More »Working with Particles in Metal part 2