Warren Moore

Rendering Physically-Based ModelIO Materials

In this article, we’ll take a look at a portion of the ModelIO framework we haven’t used so far: materials. In previous articles, we’ve used ModelIO to do the heavy lifting of loading 3D geometry, but have loaded and applied textures manually. This ad hoc approach works when we only have a base color map, …

Rendering Physically-Based ModelIO Materials Read More »

Writing a Modern Metal App from Scratch: Part 2

In the previous article, we wrote enough Metal code to get the spinning silhouette of a teapot on the screen, but that still leaves a lot to be desired as far as a “modern” app is concerned. In this article, we’ll further flesh out the app and introduce lighting, materials, texturing, and managing multiple objects …

Writing a Modern Metal App from Scratch: Part 2 Read More »

Writing a Modern Metal App from Scratch: Part 1

Getting Started This article is a quick introduction to how to use the Metal, MetalKit, and Model I/O frameworks in Swift. If you know your way around UIKit or Cocoa development, you should be able to follow along for the most part. Some things like shaders and matrices will be foreign to you, but you …

Writing a Modern Metal App from Scratch: Part 1 Read More »

The Metal by Example Book is Now Available!

Metal by Example is now a book! You can buy it here as a DRM-free PDF. Since I started this site, I’ve been wanting to turn Metal by Example into a book. Although the blog format is good for quickly publishing techniques one at a time, a book is necessarily a more cohesive experience. For …

The Metal by Example Book is Now Available! Read More »

Metal Performance Shaders in Swift

What is the Metal Performance Shaders Framework? Announced at WWDC 2015, the Metal Performance Shaders (MPS) framework is a collection of high-performance image filters for iOS 9. Each filter in the library is an efficient black-box implementation of a common image processing task: blur, edge detection, convolution, etc. One useful trait of Apple’s black-box approach …

Metal Performance Shaders in Swift Read More »

First Look at MetalKit

MetalKit is a forthcoming framework on iOS 9 and OS X El Capitan that greatly eases certain tasks such as presenting Metal content in a UIView or NSView, texture loading, and working with model data. This post is an overview of the features offered by MetalKit. Many of our articles so far have focused on …

First Look at MetalKit Read More »

Compressed Texture Formats in Metal

In this article, we will consider several GPU-friendly compressed texture formats. These formats allow us to trade some image quality for substantial improvements in disk usage and performance. In particular, we will look at the ETC2, PVRTC, and ASTC formats.

Rendering Text in Metal with Signed-Distance Fields

In this article, we will discuss a method for rendering high-fidelity text with Metal. It’s easy to overlook text rendering when thinking about 3D graphics. However, very few games or applications can get by without displaying any text, so it’s important to consider how we can best use the GPU to incorporate text into our …

Rendering Text in Metal with Signed-Distance Fields Read More »

Translucency and Transparency in Metal

Introduction One of the topics we’ve handily avoided so far in our exploration of Metal is rendering of materials that are not opaque. In this post, we’ll explore a couple of related techniques for achieving transparency and translucency: alpha testing and alpha blending. The sample scene for this post is a desert containing many palm …

Translucency and Transparency in Metal Read More »

Video: An Introduction to 3D Graphics with Metal in Swift

In November 2014, I was privileged to deliver a talk to San Francisco’s Swift Language User Group, hosted by Realm. They’ve now uploaded the video, with subtitles and synchronized slide deck to their site. You can view the video here.