Skip to content

Beginning Metal – a new course

Caroline, a good friend of mine and an awesome Metal programmer, just launched her new video course – Beginning Metal – through the website. The first 2 lessons are free, however, to watch the remaining 13 videos you’d need to purchase membership for at least one month. Each of the lessons provide the sample code used in the videos as well as challenges that you would want to solve preferably before moving on to the next lesson. At the… Read More »Beginning Metal – a new course

Using MetalKit part 2*3^2

Yes, as the title suggests, we’re going to have another of those posts with math (and fun) in it. I was thinking the other day, what can we do while commuting for an hour or so, without internet and possibly without a laptop as well, just carrying an iPad with us. Luckily, the iPad now has the awesome Swift Playgrounds app. Let’s start with a new playground that runs a basic compute kernel. Since the current… Read More »Using MetalKit part 2*3^2

Using MetalKit part 17

I am writing this article for three reasons: first, to tell you that I am working on updating all the Metalcode to Swift 3 and then moving the tutorials to a new home with a nicer design and a proper domain name; second, I wanted to show you a different way to work with MetalKit other than subclassing MTKView, that is, using the MTKViewDelegate; and third, I wanted to answer one of our readers’ question about how… Read More »Using MetalKit part 17

The Model I/O framework

Model I/O was introduced in 2015 for iOS 9 and OS X 10.11 and it is a framework that helps us create more realistic and interactive graphics. We can use it to import/export 3D assets, to describe lighting, materials and environments, to bake lights, to subdivide and voxelize meshes, and for physical based rendering. Model I/O easily integrates our assets with our code in various 3D APIs: In order to import an asset we simply do: To export an asset… Read More »The Model I/O framework

Ray tracing in a Swift playground part 6

Today, I am looking again at the Ray Tracing project because I wanted to see how it runs in an iPad Playground. There aren’t any changes in the core code for now, except I have updated it to run on iOS 10, Xcode 8, Swift 3 and the new iPad Playground app. If you run the playground, now you have the option to play with the number of samples (ns) right on the main page… Read More »Ray tracing in a Swift playground part 6

Metal Performance Shaders for the iPad playground

As many of you might have seen at WWDC 2016, the new Playground app for the iPad was a really big hit! As an already playgrounds lover, for me it was even more than that. Now we are able to easily write Swift code on the iPad and run it with just a button tap. Today we are going to have fun with Metal Performance Shaders (MPS) since I have not discussed about them before, and also… Read More »Metal Performance Shaders for the iPad playground

Using MetalKit part 16

A couple of weeks ago, at the WWDC 2016, the Apple engineers released a new document, the Metal Best Practices Guide which includes useful information about organizing your code for better performance in your Metal apps. Because the documentation is quite extensive, we are just going to outline the main concepts in this article. An efficient Metal app requires: Low CPU overhead. Optimal GPU performance. Continuous processor parallelism. Effective resource management. 1 Resource Management 1.1 Persistent Objects Best Practice: Create persistent objects early… Read More »Using MetalKit part 16

Using MetalKit part 15

At the end of part 13 we concluded we can make our planet look more realistic in two ways: either apply a texture to it, or add some noise to the planet color. We showed how to add noise in part 14. This week we look at textures and samplers. Textures are useful because they can provide a greater level of detail to surfaces than color computing for each vertex could. Let’s pick up where we left off… Read More »Using MetalKit part 15

What’s new in graphics and games at WWDC 2016

Like every year, June is my favorite month of the year for several reasons, but WWDC is most likely the top one! Watching the opening Keynote and the Platforms State Of The Union sessions yesterday revealed a plethora of new features and even a few new frameworks. In this article, I am only going to focus on what’s new in the Graphics and Games track. Let’s start with Metal, obviously. By far, the hottest and most anticipated feature is support for Tessellation which… Read More »What’s new in graphics and games at WWDC 2016

Using MetalKit part 14

Let’s pick up where we left off in Part 13. Using the same playground we worked on last time, we will learn about noise today. From Wikipedia: Noise refers to any random fluctuations of data that makes the perception of an expected signal, difficult. Value noise is a type of noise commonly used as a procedural texture primitive in computer graphics. This method consists of the creation of a lattice of points which are assigned random values.… Read More »Using MetalKit part 14