Utterly Unplayable: Unreal Engine is one of the most popular middleware solutions for developing games and other interactive experiences, particularly on PC and Mac. Created by Epic Games, it is also notorious for stuttering and graphics performance issues. However, the developers are actively working to address these problems once and for all.
If you’ve played a game released in the past few years, you’re likely familiar with the frustrating experience of shader compilation stutter. Shaders are small programs executed directly by the GPU to handle various tasks required for rendering complex, feature-rich 3D graphics. When a rendering engine needs to compile a new shader just before drawing a scene on screen, everything comes to a halt while the GPU driver completes the task, resulting in the infamous stuttering effect many modern games suffer from.
Shader stuttering has become so widespread that Epic Games is now working to eliminate this multi-platform scourge of real-time graphics. Developers working on the Unreal Engine recently explained the importance of shader compilation and the root causes of stuttering. Kenzo ter Elst, Daniele Vettorel, and other Epic Games engineers have been developing a new system called PSO precaching, which, in theory, could make shader stuttering a thing of the past.
Pipeline State Objects (PSOs) are a method used by modern GPUs to bundle shaders and other graphics settings for a draw request into a single “unit,” Epic developers explained, allowing them to be executed more efficiently. These PSOs can be built at any time and, theoretically, leveraged to optimize shader compilation, preventing stuttering during rendering.
Before Unreal Engine 5.2, Epic recommended that developers bundle the most common PSOs into a cache, allowing games to precompile most of the shader code during loading screens. However, converting bytecode shaders into GPU-specific binary code remains computationally demanding, and the cache often requires frequent updates in the ever-evolving environments of modern games.
According to Unreal Engine developers, PSO precaching could eliminate stuttering caused by this issue. The engine would analyze a recently loaded object and select a specific “subset” of all possible PSOs needed to render it. While this subset would still be larger than the actual PSOs used for rendering, it would be far smaller than the millions of possible rendering combinations.
With PSO precaching, precompilation would be significantly faster, introducing only a small, unnoticeable delay of just a few frames. Epic developers claim this system can “eliminate” PSO compilation stuttering for materials and work seamlessly with user-generated content. However, global shaders not associated with materials – such as those used for post-processing effects like motion blur – could still cause rare instances of stuttering the first time they are compiled. Unreal Engine’s engineers are actively working to resolve this issue as well.
Source link