Metal Programming with Swift
May 3, 2020
I’ve posted a new project on GitHub called Metal-Swift, which demonstrates how to create a Metal application written in Swift. This is essentially the Metal-equivalent of my CocoaOpenGL-Swift project, which uses OpenGL for graphics rendering. It features a rotating, normal mapped cylinder that is illuminated by three moving point lights of different colors.
This application is intended to serve as a very simple example of using Metal to render 3D graphics, incorporating a few fundamental concepts like loading textures, using vertex/fragment shaders, and rendering a mesh. It’s released under a BSD-style open source license, so feel free to incorporate any parts of it into your own projects.