Writing shader with Metal for user interface

updated 10 months ago

This proposal has been withdrawn...

Have you ever been interested in Metal but don’t know where to start or where to use in your application? Shader programming with Metal would be a good starting point for learning the framework and understating the basic concept of parallel computing. In this presentation, I would like to introduce shader programming with Metal and how “fun” and “easy” it is.

Shaders are used widely in computer graphics field and Metal enables them to be integrated easily to the UIKit based application. Shaders can enable animations which would be very complicated or difficult to draw with the existing animation frameworks such as UIKit animations or CALayer animation, and, I believe, it brings more visually appealing user interface design.

In this presentation, I will cover the following points: - Brief introduction to Metal - What is Metal, and advantages over OpenGL - Requirements for Metal - Main APIs of Metal - Basic idea of Shader - Metal on Playground - Drawing UI parts with fragment shader - I will show how to draw downloading indicator or pop ups using Metal like below:

downloading indicator pop up

  • Fluid simulation with Metal
    • One of the advantages of Metal is the integrated API for graphics rendering and data-parallel computation. In this example, I will show a fluid animation modeled with Navier-Stokes equations as below and explain the concept of GPGPU.

      fluid simulation