logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

Epic Games Devs On Solutions To Unreal Engine 5 Shader Stuttering Issues

The creators of the engine's PSO precaching system explained how it reduces shader stuttering, offered best practices for minimizing issues, and outlined future plans.

While Unreal Engine 5 is often praised for its stunning graphics, there's another thing many associate with it: stutter. If you're wondering why this happens and how it's being tackled, Kenzo ter Elst, Daniele Vettorel, Allan Bentham, and Mihnea Balta, the engineers who worked on Unreal Engine's PSO precaching system, have shared the details in a new blog post, outlining their efforts to reduce it.

Shader compilation stuttering happens when a game engine needs to compile a new shader just before using it, causing a delay while the driver finishes the process. Shaders are programs that run on the GPU to render 3D images and are written in high-level languages like HLSL. Unlike CPUs, which have a few common instruction sets, GPUs have many different ones, so shaders are compiled into a universal bytecode that can be translated into specific machine code by the driver at runtime.

This process was fine when shaders were simpler, but as games became more complex, the time spent compiling shaders during gameplay became noticeable, leading to stuttering. To fix this, modern APIs like Direct3D 12 and Vulkan introduced Pipeline State Objects (PSOs), which help avoid runtime shader compilation and reduce stuttering.

APIs now require developers to bundle all the shaders and settings for a draw request into a Pipeline State Object, which is set as a single unit. The key advantage of PSOs is that they can be created at any time, allowing engines to prepare everything in advance (such as during loading) and ensuring shader compilation completes before rendering begins.

Before Unreal Engine 5.2, the recommended approach was using a Bundled PSO Cache, where commonly used PSOs were cached at game startup or when loading a save/level. However, this method is resource-intensive and needs frequent updates in games with dynamic content. To support large, dynamic game worlds and user-generated content, Unreal Engine 5.2 introduced PSO precaching to address the issues of resource-heavy bundled caches. However, this system isn't flawless too: global shaders (used in effects like motion blur) can't be fully precached in the same way. While compute shaders can be precached, graphics shaders can't.

GPU drivers store compiled PSOs on your SSD or hard drive for faster reuse or in system memory. However, the PSO cache can become quite large, so this should only be done on machines with sufficient RAM. Solutions to reduce memory impact and automatically decide when precached PSOs should be retained are already in development.

In short, Epic Games recognizes that shader compilation stuttering is an issue in Unreal Engine 5 games and is working on fixes. It also advises developers to use the latest engine version, profile PSO hitches regularly, clear the driver cache before playtests, and look out for other types of traversal stuttering.

For more on this topic, you can join Epic Games on the Inside Unreal stream this Thursday, February 6th, on Twitch or YouTube at 2 PM ET.

Read the full blog post here and don't forget to join our 80 Level Talent platform and our new Discord server, follow us on InstagramTwitterLinkedInTelegramTikTok, and Threads, where we share breakdowns, the latest news, awesome artworks, and more.

Join discussion

Comments 1

  • Anonymous user

    > To fix this, modern APIs like Direct3D 12 and Vulkan introduced Pipeline State Objects (PSOs), which help avoid runtime shader compilation and reduce stuttering.
    This isn't what PSOs are for. They are a theoretical optimization when it comes to state change between shaders (or shader state). They make the problem _worse_ because now even more has to be known up front, increasing the chance of just-in-time PSO compilation (-> stutter)

    > The key advantage of PSOs is that they can be created at any time, allowing engines to prepare everything in advance (such as during loading) and ensuring shader compilation completes before rendering begins.
    This is also not true. Yes PSOs can be compiled up front. But so can shaders. Again PSOs make this harder for engines as they must know much more state before they can even begin compiling the PSO! Often they even need "in-game" info, making it impossible to preload entirely

    0

    Anonymous user

    ·6 days ago·

You might also like

We need your consent

We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more