Epic Games Devs On Solutions To Unreal Engine 5 Shader Stuttering Issues
cgshares.com
While Unreal Engine 5 is often praised for its stunning graphics, theres another thing many associate with it: stutter. If youre wondering why this happens and how its being tackled, Kenzo ter Elst, Daniele Vettorel, Allan Bentham, and Mihnea Balta, the engineers who worked on Unreal Engines 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 isnt flawless too: global shaders (used in effects like motion blur) cant be fully precached in the same way. While compute shaders can be precached, graphics shaders cant.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, onTwitchorYouTubeat 2 PM ET.Read the full blog post here and dont forget to join our80 Level Talent platformand ournew Discord server, follow us onInstagram,Twitter,LinkedIn,Telegram,TikTok, andThreads, where we share breakdowns, the latest news, awesome artworks, and more.Source link The post Epic Games Devs On Solutions To Unreal Engine 5 Shader Stuttering Issues appeared first on CG SHARES.
0 Comentários ·0 Compartilhamentos ·59 Visualizações