Categories
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 […]

Categories
Uncategorized

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 […]

Categories
Uncategorized

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 […]

Categories
Uncategorized

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 […]

Categories
Uncategorized

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 […]

Categories
Uncategorized

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 […]

Categories
Uncategorized

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 […]

Categories
Uncategorized

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, […]

Categories
Uncategorized

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 […]

Categories
Uncategorized

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 […]