Since all you Dear Readers seemed to think our Daft Punk allusion last post was clever, let’s do another music callout this time. Not that it really takes a whole lot of clever to connect up Metal with a particularly extreme genre of such, but hey, it gives us an excuse to link to the thrashiest of thrash bands playing the Duke Nukem theme for your post-reading background music, which we just haven’t done enough of so far.
Any-ways, in case like us you’d pretty much skipped over stuff about Metal figuring it was only of interest to game engine writers, there’s some interesting stuff around that people are doing with it you might like to be aware of. In particular, this FlexMonkey post caught @NatashaTheRobot‘s eye (and if you’re not subscribed to her Swift newsletter, you should be):
Following on from my last post where I managed to calculate and render over 1,000,000 particles in realtime, I’ve done some pretty effective tweaking of the code to create an app that calculates and renders (with blur and trails) over 2,000,000 particles at around 25 frames per second on my iPad Air 2…
Not bad, not bad. Also note followup:
…With Metal, I’ve been able to create a kernel shader that can calculate and render 4,096 swarm members at 30fps – so that’s 16,777,216 particle interactions per frame or 503,316,480 particle interactions per second! Pretty impressive stuff for a tablet computer!
Code at FlexMonkey / MetalParticles, with UI described in Adding a User Interface to my Swarm Chemistry App on an iPad
So that’s pretty cool, but still a little niche. A good number of you probably run into need for parallel computation, particularly image processing, not all that rarely though, yes? Start over at Metal-dedicated site Metal By Example and check out these articles:
This post is an introduction to topics in compute (or data-parallel) programming. It is designed to be read before its companion article, Fundamentals of Image Processing. In this article, we will cover the basics of setting up the compute pipeline and executing kernel functions on large sets of data in parallel…
In this post, we will start exploring the world of image processing with the Metal shading language. We will create a framework capable of representing chains of image filters, then write a pair of image filters that will allow us to adjust the saturation and blur of an image. The end result will be an interactive app that allows you to control the image filter parameters in real-time…
Back at FlexMonkey there’s a project FlexMonkey / MetalReactionDiffusion building off that described in these posts:
And as long as we’re mining for Metal nuggets here, if this has inspired you to go learn more about it from scratch, here’s some good intros:
If you want to get more into the rendering side than that, then check out all the rest of the articles at Metal By Example.Continue Reading →