Search Results for: render to texture

Rendering 3D Text with Core Text and libtess2

In this article, we’ll discuss how to create and render 3D text with Metal. Most applications need to render text, and there are many techniques for drawing 2D text with graphics APIs, from pre-rasterized font atlases, to signed-distance field methods like Chris Green’s seminal work at Valve or GLyphy, to cutting-edge vector-based solutions like Slug. …

Rendering 3D Text with Core Text and libtess2 Read More »

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 »

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 »

Instanced Rendering in Metal

In this article, we will discuss an important technique for efficiently drawing many objects with a single draw call: instanced rendering. This technique helps you get the most out of the GPU while keeping memory and CPU usage to a minimum. The sample app for this post renders several dozen animated cows moving on top …

Instanced Rendering in Metal Read More »

Textures and Samplers in Metal

Textures are a central topic in rendering. Although they have many uses, one of their primary purposes is to provide a greater level of detail to surfaces than can be achieved with vertex colors alone. In this post, we’ll talk about texture mapping, which helps us bring virtual characters to life. We’ll also introduce samplers, …

Textures and Samplers in Metal Read More »

Up and Running with Metal, Part 3: Lighting and Rendering in 3D

In this post, we’ll finally start rendering in 3D. In order to get there, we’ll talk about how to load 3D model data from disk, how to tell Metal to draw from a vertex buffer using indices, and how to manipulate objects in real time. This post assumes that you know a little linear algebra. …

Up and Running with Metal, Part 3: Lighting and Rendering in 3D Read More »

Mesh Shaders and Meshlet Culling in Metal 3

Metal 3, introduced by Apple at WWDC 2022, brought with it a significant number of features that enable modern rendering techniques, faster resource loading, and flexible shader compilation. It also includes an all-new geometry pipeline that unlocks novel rendering techniques by allowing developers to bypass most of the traditional vertex processing steps and submit geometry …

Mesh Shaders and Meshlet Culling in Metal 3 Read More »

Introduction to Tessellation in Metal

In this article we will take a look at how to do tessellation on the GPU with Metal. Tessellation is a powerful technique for generating geometry dynamically with many use cases from CAD/CAM to game development and beyond. This article discusses the fundamentals of tessellation and how to do it in Metal; future articles will …

Introduction to Tessellation in Metal Read More »

Understanding Metal Enhancements in the A15 Bionic GPU

With the advent of iPhone 13 comes a new generation of Apple-designed system-on-a-chip: the A15 Bionic. As has become expected, Apple has published a developer-oriented tech talk to explain the new and enhanced GPU features included in this latest cutting-edge offering. You can watch it here. The tech talk is the best official source of …

Understanding Metal Enhancements in the A15 Bionic GPU Read More »

WebGPU for Metal Developers, Part Two

In the previous article we took a first look at WebGPU and got familiar with the essential pieces of the API, the command submission model, and drawing in 2D from a static buffer. In this article, we’ll look much deeper into WebGPU. Some of our topics include: texture creation and sampling displacement mapping in WGSL …

WebGPU for Metal Developers, Part Two Read More »