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 trees and a few pools of water. The leaves of the palm trees consist of a few polygons each, textured with a partially-transparent texture, and the water is rendered as a translucent surface via alpha blending, which we’ll discuss in detail below.

The sample application from this article demonstrates alpha testing and alpha blending
The sample application from this article demonstrates alpha testing and alpha blending

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.

Speaking at Realm, November 4, 2014 (Photo credit: Scott Stevenson)
Speaking at Realm, November 4, 2014 (Photo credit: Scott Stevenson)