Sample Code

Rendering a Scene with Forward Plus Lighting Using Tile Shaders

Implement a forward plus renderer using the latest features on Apple GPUs.



Configure the Sample Code Project

To run the app:

  • Build the project with Xcode 11 or later.

  • Target an iOS device with an A11 chip or later and iOS 11 or later.

See Also

GPU Programming Techniques

Rendering a Scene with Deferred Lighting

Implement a deferred lighting renderer that takes advantage of unique Metal features.

Rendering Reflections with Fewer Render Passes

Use layer selection to reduce the number of render passes needed to generate an environment map.

Using Function Specialization to Build Pipeline Variants

Create pipelines for different levels of detail from a common shader source.

Rendering Terrain Dynamically with Argument Buffers

Use argument buffers to render terrain in real time with a GPU-driven pipeline.

Mixing Metal and OpenGL Rendering in a View

Draw with Metal and OpenGL in the same view using an interoperable texture.

Modern Rendering with Metal

Use advanced Metal features such as Indirect Command Buffers, Sparse Textures, and Variable Rate Rasterization to implement modern rendering algorithms.