Down to the Metal: what Apple’s new graphics API means for Mac apps and games

Get the official T3 lowdown on Apple's new Metal graphics API

Try to imagine riding a bike with square wheels. To move, more effort is required than when using ordinary wheels. This is how Eternal Storms Software founder Matthias Gansrigler describes OpenGL on the Mac. Until now, OS X has been lumbered with square wheels – a problem, given that OpenGL is a key system component; as Apple puts it, the API “gives your app access to amazing 3D graphics capabilities”, and it's especially important in games, creative software, and medical solutions.

OS X's relatively poor-performing OpenGL implementation has seen the Mac lag behind Windows in these key areas. Apple's Metal aims to be the solution, offering improved rendering performance and efficiency. In this feature, developers explain how Metal will impact on the apps and games you love, and what it means for the future of the Mac.

For the uninitiated, software engineer and writer Warren Moore explains that Metal is “a graphics application programming interface (API), which means it's a way for apps to get visual content like text and images on to the screen”. More particularly, it's a “3D graphics API, useful for 3D elements commonly seen in games, and visual effects – lights, shadows, materials – that bring such games to life”.

First introduced in iOS 8, Metal is a sort-of successor to the broadly-adopted graphics API OpenGL, which Moore notes was, until recently, the only 3D graphics API supported on the Mac, and “until its latest revisions – not yet available on OS X – had significant systemic inefficiencies”. By contrast, Metal gives developers more direct access to your Mac's graphics processor unit (GPU), which results in improved performance and efficiency. This, says Moore, means developers can “build faster, more efficient apps using hardware already in the hands of millions of Mac owners”. And since Apple “rebuilt some chief components of OS X on top of Metal, this will bring much higher performance to every app, regardless of whether its creators directly use the Metal API”.

Developer and programmer Simon Gladman adds that there are further advantages to Metal: “It's important because it enables software vendors to create high-performance graphics-based applications, such as games and 3D content-creation software, with a common code-base between desktop and iOS devices. A common code-base means a faster time to market and lower costs associated with software development and maintenance.”

Playing the game

On hearing 'Metal', Gansrigler isn't alone in first thinking of games, largely because Apple's been pushing the technology in iOS 8. He's hopeful Metal will boost Mac gaming in a similar way to how it improved things on mobile: “For years, Macs have lagged behind Windows PCs with similar specs when it comes to games performance. Even on the same machine, when running a game on OS X and then on Windows using Boot Camp, the difference has often been, to say the least, noticeable.”

Giant Spacekat founder Brianna Wu provides examples: “Civilization V runs drastically worse on OS X, and Final Fantasy XIV was suspended. The latter uses OpenGL on Windows and Mac, but because the same code was so inefficient on Mac, they had to pull the game from sale.” With Metal, she says, Mac games will finally become more competitive with their Windows counterparts, through developers gaining access to tools for writing the most efficient, high-performance algorithms for your graphics card.

MetalGL's Bill Hollings says this should “provide additional headroom for those highly-tuned games and apps pushing at the limits”, although developers will need plenty of investment and effort to make use of such capabilities. Through reducing CPU usage, Gansrigler posits Metal-based titles could offer improved physics, AI, audio or game logic over OpenGL equivalents. And freelance developer Andreas Monitzer reckons “professional games will be able to provide the same visual fidelity as on Windows, while reduced battery drain means you'll be able to play for longer”.

Performance leap

Unsurprisingly, high-profile games studios have already confirmed interest in Metal, seduced by Apple's promises of up to a 50% leap in rendering performance (meaning higher frame-rates) and 40% higher efficiency. But Hollings warns there is a snag: “This is, remember, a technology that does not provide cross-platform support”. Professional tools, he says, will generally be able to 'hide' this from the developer, using Metal for Apple devices and other frameworks elsewhere. Moore adds this will “allow game programmers who use such tools to immediately see the benefits”. But otherwise, Hollings says developers are left to use incompatible technologies, such as OpenGL and DirectX, elsewhere. Naturally, he suggests MetalGL – an implementation of the OpenGL API that runs on the Metal platform – can assist under such circumstances.

Developer Glyn Williams, though, urges a touch of caution when it comes to Metal's potential for any growth in Mac gaming: “I don't ever see the Mac becoming a first-class gaming platform. The economics of the industry do not favour a smaller platform where most users have mobile GPUs.” In other words, the inherent nature of the hardware may still count against the Mac, although it's arguable Windows isn't immune to such issues, with the majority of sales being notebooks rather than desktops, let alone powerful gaming rigs.

Apptastic

Gladman is keen to note Metal isn't just for games: “As well as 'vertex' and 'fragment' shaders which are used for 3D, Metal includes 'compute' shaders. These allow parallel data computation for tasks such as data visualisation, image processing and physics simulations. Already companies such as The Foundry and Adobe are using Metal to speed up their content-creation software.”

In fact, Moore explains Metal potentially benefits every app on your Mac: “Apple has re-architected key display technologies like Core Graphics and Core Animation to reduce CPU usage, reduce energy use, and increase graphics performance. This means actions like moving windows and transitioning between windowed and full-screen modes are snappier on OS X El Capitan than Yosemite on comparable hardware. In this sense, users will feel the difference without any action on the part of application developers.”

Naturally, creative apps have the most to gain from Metal, though (rather than the relatively tiny gains the likes of Finder will see), and Gansrigler's excited about the possibilities. He reckons pro apps that could particularly benefit include Final Cut Pro X and Adobe's After Effects, through “being able to live-preview more effects at the same time and render the resulting video more quickly”. (Indeed, at WWDC 2015, Apple Senior Vice President Craig Federighi said Metal helped Adobe improve the effects rendering engine within After Effects up to 8x.)

Such performance boosts could, according to Gansrigler, turn content creation on its head. “For example, in 3D model creation, it isn't uncommon to deactivate complex shaders when working on a model, because turning it around becomes sluggish and unbearable”, he explains. “Metal might make it possible to leave those shaders active”, thereby giving the designer “a much better look at what they're working on at all times”, and resulting in a superior end product through quicker iteration. And regardless of your chosen field, desktop displays are now following mobile in ramping up to high-resolution, which makes graphics performance increasingly important.

Resources required

Despite the potential afforded by Metal, developers are cautious about singing its praises too much. Indie Mac/Linux porter Ethan Lee complains it's restricted to “those with resources to dedicate towards Apple-specific products”, claiming that “the rest of us are basically going to get nothing out of this”. Monitzer counters that some gaming indies will at least be covered through “Metal being adapted by large game engines, meaning anything developed with them will use it automatically”.

Gladman echoes Lee's concerns about Metal, saying it “requires a fair amount of effort to really get up and running”, and wonders whether Apple should deliver a high-level framework to exploit its power: “This could mean extending SceneKit, for example, with a suite of new features, such as photorealistic renderers and GPU-based solvers for cloth, hair, smoke and liquid simulations”. Alternatively, he mulls the emerging open-source community around Metal could fulfil that role.

More positively, Moore says we've already seen Metal “bring new gaming experiences to iOS by enabling more immersive effects and a greater amount of content on the screen at once”, and the Mac could enjoy improved games and OS snappiness. And Gansrigler wonders whether Metal could usher in more Mac ports, due to a combination of the platform's increasing sales and developers being enticed by the new and impressive API.

The competition

It's worth remembering Apple is not alone in this space. Microsoft is working on a Metal-like version of its own DirectX, and The Khronos Group recently announced Vulkan, a cross-platform spiritual successor to OpenGL. Moore believes if you saw an architectural diagram of the three APIs, “the similarities would be striking, because the idea of reducing CPU overhead is part of a sea change that's been underway for years”; Lee, though, is irked Apple has taken a proprietary route: “Metal is downright irritating for anyone who ships for more than one platform. OpenGL meant I could ship basically wherever I wanted. With Vulkan happening at literally the exact same time, I can't help but be incredibly annoyed we're now looking at another proprietary API.”

We've heard similar complaints elsewhere, and therefore wonder whether rather than seeing more Mac software, as Gansrigler hopes, Metal's proprietary nature might result in the platform getting less. Wu doesn't think so. She's not only excited about the prospect of a well-implemented Metal giving OS X parity with Windows, but also the advantages Apple enjoys: “With Windows machines, there are so many graphics cards, it's impossible to address them all. With OS X, Apple's only working with so many, and so can write specific shortcuts and tricks for your graphics card, in ones and zeroes. This is something only Apple can do.”

She continues by arguing developing for Apple users always requires a trade-off: “Cross-platform technology might be easier for you as a developer, but gives a worse experience for the consumer, and that's not an experience Apple customers are comfortable with. If that's your attitude, perhaps OS X isn't the best fit for you.” Gansrigler concurs, and adds Apple's advantage in everything coming from one place could eventually push Metal ahead of its rivals: “Apple has stated the shaders they provide have been fine-tuned for every single graphics chip supported by Metal. I don't think Microsoft nor The Khronos Group will be able to say the same!”

T3 Online

T3.com is one of the UK's leading consumer lifestyle websites, visited by over 10 million people every month. You can follow us on TwitterFacebook and Instagram. We present products in helpful buying guides and carefully curated deals posts across style, living, auto, smart home, watches, travel, fitness and more. We also have a monthly magazine which you can buy in newsagents or subscribe to online – print and digital versions available.