Hello, I’m Graham Wihlidal, Engineering Fellow (Graphics) at Epic Games. I’m here to showcase the exciting features and improvements we’ve developed this year in order to launch Nanite in Fortnite Battle Royale Chapter 4. These features are available for you to try out in Unreal Engine 5.1 (as Beta).Unreal Engine 5.0 launched with Nanite in a production-ready state. It was already usable for tons of amazing things, but the initial version lacked full support for all the myriad of features available for non-Nanite meshes. Instead, we’d focused our time on polishing the core Nanite functionality.

Going forward, we’d like to extend support into many areas Nanite has not yet covered. Users have been heavily requesting support for features like World Position Offset, Pixel Depth Offset, custom UVs, two-sided materials, and masked materials. At the beginning of the year, the team undertook the challenge of trying to implement support for some of these features, requiring us to solve numerous non-trivial problems.

GPUs started with what was known as a fixed function pipeline, where the method in how geometry was transformed—and how depth and color was written—was built into the hardware, and could only be configured with a limited set of pre-defined functions. Later on, hardware became “programmable” through shader code, enabling new possibilities for graphics and allowing for features that were difficult or impossible to do using the fixed function pipeline.

From its inception, Nanite has always supported “programmable” material graph shaders controlling the output color, but the rasterizer itself—which decides how vertices are positioned on screen and which pixels get covered by the triangles—was effectively “fixed function”:it was still implemented as shader code, but a content creator had no control over that logic.

In order to support the aforementioned features in Nanite, we needed to make the rasterizer itself programmable.

Initial prototype

We set out to prototype the architecture needed to support material graph logic in the rasterizer, which has been coined “Nanite Programmable Rasterizer.”

The following images show the initial prototype of a masked material animating over a Nanite garbage truck mesh.
 

Source: Unreal Engine Blog