Unreal Engine Has The Shader Stuttering Solution



Unreal Engine 5.2 introduced a new system for preloading Pipeline State Objects (PSOs) to help reduce stuttering caused by shader compilation in games. This alleviates shader stuttering, which is a huge problem in PC games right now.

Shader compilation stuttering (also known as shader stuttering) happens when a game needs to prepare a shader just before it can be displayed, leading to noticeable delays and the shader popping in noticeably. This delay happens because converting high-level shader code into machine code that different graphics cards can understand is complicated.

Modern graphics APIs like DirectX 12 and Vulkan introduced PSOs to improve performance. PSOs combine shaders and rendering settings so that they can be prepared in advance. However, the sheer number of possible PSO combinations can be overwhelming in complex games with many different materials and rendering options. Earlier methods, like Unreal Engine’s “Bundled PSO Cache,” couldn’t keep up. This cache required a lot of resources to track and was hard to manage.

The new PSO precaching system by Unreal solves some previous issues. When loading, it examines materials, meshes, and overall settings to determine which PSOs (Pipeline State Objects) are likely needed. These are prepared during a loading screen or just before they’re needed. If objects come in later, they can either wait for the PSOs to be ready or use a basic material instead. This helps reduce noticeable delays.

It’s great that engines are working to fix this problem. What’s interesting is that this is only an issue because of the improvements in technology. In the past, games would come with precompiled shader code, which the graphics driver would then convert while the game was running. This worked well for simpler games, but performance issues emerged as shaders became more complex and graphics cards improved.

Keep in mind that dealing with changes in materials is a work in progress and currently only applies to some shaders. For example, Global shaders (used for effects like motion blur) are handled differently and will still see issues. However, there are plans to improve this in the future.

Still, it seems like Unreal is leading the charge to fix this problem for players. Hopefully, a permanent solution will make shader stuttering a thing of the past.

Source: Unreal



Source link

Previous articleNetgear says you should patch your router right now