That stunning Unreal Engine 5 demo still has gamers and tech geeks discussing every single element across the four corners of the Web. It's one of those cases where the entire industry stops to gaze at something very significant, and then the guessing game begins regarding how those new techniques were achieved.
Luckily, instead of continuing to guess, we did learn a bit more straight from Epic in a follow-up interview with Eurogamer's Digital Foundry on the two main new Unreal Engine 5 features showcased on that demo: Lumen and Nanite.
Starting with Lumen, the new real-time Global Illumination system, many (including myself) wondered why there was no mention of ray tracing technology at work. As it turns out, there is ray tracing in Lumen, but only for indirect lighting, thus there's no need for hardware acceleration.
Daniel Wright, Technical Director of Graphics at Epic, said:
Lumen uses ray tracing to solve indirect lighting, but not triangle ray tracing. Lumen traces rays against a scene representation consisting of signed distance fields, voxels and height fields. As a result, it requires no special ray tracing hardware.
Lumen uses a combination of different techniques to efficiently trace rays. Screen-space traces handle tiny details, mesh signed distance field traces handle medium-scale light transfer and voxel traces handle large scale light transfer.
The other pillar of the Unreal Engine 5 is Nanite, the ambitious system to 'virtualize micropolygon geometry' that promises to deliver scenes comprised of dozens of billions of polygons that are streamed and scaled in real-time.
According to Senior Graphics Programmer Brian Karis, Epic used PlayStation 5's primitive shaders (properly introduced by AMD with the RDNA 1.0 architecture), though the developers also made 'hyper-optimised' software shaders.
The vast majority of triangles are software rasterised using hyper-optimised compute shaders specifically designed for the advantages we can exploit. As a result, we've been able to leave hardware rasterisers in the dust at this specific task. Software rasterisation is a core component of Nanite that allows it to achieve what it does. We can't beat hardware rasterisers in all cases though so we'll use hardware when we've determined it's the faster path. On PlayStation 5 we use primitive shaders for that path which is considerably faster than using the old pipeline we had before with vertex shaders.
This is the equivalent of NVIDIA's mesh shaders, which are also mentioned by Microsoft as part of the DirectX 12 Ultimate API and of the Xbox Series X hardware. Clearly the same technique can be used on PC and Xbox Series X, then, and those platforms should outperform PlayStation 5 in this particular task given their superior compute capabilities.