Добавить новость
Январь 2010 Февраль 2010 Март 2010 Апрель 2010 Май 2010
Июнь 2010
Июль 2010 Август 2010
Сентябрь 2010
Октябрь 2010
Ноябрь 2010
Декабрь 2010
Январь 2011
Февраль 2011 Март 2011 Апрель 2011 Май 2011 Июнь 2011 Июль 2011 Август 2011
Сентябрь 2011
Октябрь 2011 Ноябрь 2011 Декабрь 2011 Январь 2012 Февраль 2012 Март 2012 Апрель 2012 Май 2012 Июнь 2012 Июль 2012 Август 2012 Сентябрь 2012 Октябрь 2012 Ноябрь 2012 Декабрь 2012 Январь 2013 Февраль 2013 Март 2013 Апрель 2013 Май 2013 Июнь 2013 Июль 2013 Август 2013 Сентябрь 2013 Октябрь 2013 Ноябрь 2013 Декабрь 2013 Январь 2014 Февраль 2014
Март 2014
Апрель 2014 Май 2014 Июнь 2014 Июль 2014 Август 2014 Сентябрь 2014 Октябрь 2014 Ноябрь 2014 Декабрь 2014 Январь 2015 Февраль 2015 Март 2015 Апрель 2015 Май 2015 Июнь 2015 Июль 2015 Август 2015 Сентябрь 2015 Октябрь 2015 Ноябрь 2015 Декабрь 2015 Январь 2016 Февраль 2016 Март 2016 Апрель 2016 Май 2016 Июнь 2016 Июль 2016 Август 2016 Сентябрь 2016 Октябрь 2016 Ноябрь 2016 Декабрь 2016 Январь 2017 Февраль 2017 Март 2017 Апрель 2017 Май 2017
Июнь 2017
Июль 2017
Август 2017 Сентябрь 2017 Октябрь 2017 Ноябрь 2017 Декабрь 2017 Январь 2018 Февраль 2018 Март 2018 Апрель 2018 Май 2018 Июнь 2018 Июль 2018 Август 2018 Сентябрь 2018 Октябрь 2018 Ноябрь 2018 Декабрь 2018 Январь 2019
Февраль 2019
Март 2019 Апрель 2019 Май 2019 Июнь 2019 Июль 2019 Август 2019 Сентябрь 2019 Октябрь 2019 Ноябрь 2019 Декабрь 2019 Январь 2020
Февраль 2020
Март 2020 Апрель 2020 Май 2020 Июнь 2020 Июль 2020 Август 2020 Сентябрь 2020 Октябрь 2020 Ноябрь 2020 Декабрь 2020 Январь 2021 Февраль 2021 Март 2021 Апрель 2021 Май 2021 Июнь 2021 Июль 2021 Август 2021 Сентябрь 2021 Октябрь 2021 Ноябрь 2021 Декабрь 2021 Январь 2022 Февраль 2022 Март 2022 Апрель 2022 Май 2022 Июнь 2022 Июль 2022 Август 2022 Сентябрь 2022 Октябрь 2022 Ноябрь 2022 Декабрь 2022 Январь 2023 Февраль 2023 Март 2023 Апрель 2023 Май 2023 Июнь 2023 Июль 2023 Август 2023 Сентябрь 2023 Октябрь 2023 Ноябрь 2023 Декабрь 2023 Январь 2024 Февраль 2024 Март 2024 Апрель 2024 Май 2024 Июнь 2024 Июль 2024 Август 2024 Сентябрь 2024 Октябрь 2024 Ноябрь 2024 Декабрь 2024 Январь 2025 Февраль 2025 Март 2025 Апрель 2025 Май 2025 Июнь 2025 Июль 2025 Август 2025 Сентябрь 2025 Октябрь 2025 Ноябрь 2025 Декабрь 2025
1 2 3 4 5 6 7 8 9 10 11 12 13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Game News |

Epic talks shop about stuttering in games that use its Unreal Engine and offers solutions to the problem

Mention the words 'Unreal' and 'Engine' to a PC gaming enthusiast, and they will no doubt immediately think of incredible-looking graphics, as demonstrated in the likes of Black Myth: Wukong, Senua's Saga: Hellblade II, and A Plague Tale: Requiem. However, there's probably one other thing that PC gamers associate with Unreal Engine and it is stutter. If you wondering just what that is and why it happens, the maker of UE has explained it all in a new blog and detailed just what it's doing to prevent it.

Let's start at the beginning. Shaders are small pieces of code that are used in graphics rendering to do a very specific task. It might be just to move a triangle about a screen or it could be for something such as calculating the colour of a pixel, based on multiple light sources, materials and other effects.

Unreal Engine is a game development tool that you program in C++ or via its built-in code blocks, called blueprints. To make it much easier to code graphics, an API such as Direct3D or Vulkan is used (application protocol interface), where you can issue one instruction and the API will then turn that into multiple other instructions for you.

However, the GPU in your graphics card doesn't understand anything that the API spits out, so its drivers need to convert the code into a format that it can process. This is generally called shader compilation and in a modern, complex 3D game, there are tens of thousands of shaders that need to be compiled.

If the game tries to do this while you're playing it, the CPU will be too busy compiling the required shaders to run the game at full speed, albeit somewhat briefly, and the game's frame rate will suddenly drop. It then bounces back up once the compiling is done, and when this repeatedly happens over and over, you get stuttering. For Unreal Engine, as Epic describes it in more detail:

"Rendering an object usually involves several shaders (e.g. a vertex shader and a pixel shader working together), as well as a number of other settings for the GPU: culling mode, blend mode, depth and stencil comparison modes etc. Together, these items describe the configuration, or state, of the GPU pipeline.

Some settings influence the executable shader code, so there are cases when the driver can only start compiling shaders when the draw command is processed. This can take tens of milliseconds or more for a single draw command, resulting in very long frames when a shader is used for the first time—a phenomenon known to most gamers as hitching or stuttering.

Modern APIs require developers to package all the shaders and settings they will use for a draw request into a Pipeline State Object [PSO] and set it as a single unit. Crucially, PSOs can be constructed at any time, so in theory engines can create everything they need sufficiently early (for example during loading), so that compilation has time to finish before rendering."

Epic then goes on to explain that, prior to Unreal Engine v5.2, its recommended best practice was to 'bundle' the most commonly required PSOs into a cache that would be created as the game starts up for the first time or when a save game or level is loaded. The problem with that approach, Epic says, is that it's very resource-intensive and in games with dynamic content, it needs to be constantly updated.

The proposed fix

With the latest versions of Unreal Engine, Epic developed what it calls PSO precaching to counter the above problems.

"When an object is loaded, the system examines its materials and uses information from the mesh (e.g. static vs. animated) as well as global state (e.g. video quality settings) to compute a subset of possible PSOs which may be used to render the object.

This subset is still larger than what ends up being used, but much smaller than the full range of possibilities, so it becomes feasible to compile it during loading. For example, Fortnite Battle Royale compiles about 30,000 PSOs for a match and uses about 10,000 of them, but that’s a very small portion of the total combination space, which contains millions.

Black Myth: Wukong (Image credit: GameScience)

Objects created during map loading precache their PSOs while the loading screen is displayed. Those that stream in or spawn during gameplay can either wait for their PSOs to be ready before being rendered, or use a default material which was already compiled. In most cases, this only delays streaming for a few frames, which is not noticeable. This system has eliminated PSO compilation stuttering for materials and works seamlessly with user-generated content."

However, the system isn't perfect, and Epic acknowledges that shaders not associated with materials, called global shaders (used in post-processing effects like motion blur, for example), aren't able to be fully precached like this. Compute shaders, yes, but not graphics shaders. "These types of PSOs can still cause rare one-time hitches when they are first used. There’s ongoing work to close this remaining gap in precaching coverage," says Epic.

You might already know that your GPU drivers save compiled PSOs to your SSD or hard disk, so they can be quickly used again, but they can just be stored in the system memory. Unfortunately, the PSO cache can get pretty big and again, this is something that Epic is aware of and working on finding a solution to it: "We are working on solutions for reducing the memory impact and automatically deciding when precached PSOs can be kept alive."

Star Wars Jedi: Survivor (Image credit: miHoYo)

In short, Epic seems to be saying that it knows shader compilation stuttering is a problem in games that use Unreal Engine, but it's actively working on solutions to it all. But if you've reached this point and you're thinking, 'Yeah, that's all fine and dandy, but I play games—I don't make them,' then I perfectly understand. After all, there's nothing we can do to prevent shader compilation.

To that end, Epic has some clear advice to developers about what they can do to reduce the whole stuttering issue, such as using the latest version of UE and regularly profiling PSO hitches during development, but also that devs need to be aware that other things cause stuttering—gamers won't know whether that's a shader compilation problem or not, but they're likely to blame it anyway.

Your next upgrade

(Image credit: Future)

Best CPU for gaming: The top chips from Intel and AMD.
Best gaming motherboard: The right boards.
Best graphics card: Your perfect pixel-pusher awaits.
Best SSD for gaming: Get into the game ahead of the rest.

It also recommends that developers don't turn to using DirectX 11, pointing out that shader compilation stutter will still happen with that API, and there are fewer ways to reduce the issue in the older tech. As Epic explains, the answer lies in the near-future, not the past: "We are finally reaching a point where we have a viable solution, and there are also good initiatives to address the API shortcomings, such as the graphics pipeline library Vulkan extension."

It's great that Epic is recognising that PSO compilation stutter is a serious enough problem to warrant such a detailed blog, but I can't help but feel that this is a little late in the day. After all, with so many UE games out there stuttering away already, the damage is already done.

Still, if the next generation of big-budget blockbusters is able to be shipped in a stutter-free state, then that's one less thing to worry about. And the woes of Star Wars Jedi: Survivor will be a thing of the past.



Читайте также

AMD wants to hire people with experience of Intel's new silicon tech, but would AMD ever actually make chips with its arch rival?

Crypto boss sentenced to 15 years over 'epic, generational scale' fraud that lost over 40 billion dollars

Представлен новый контент для второго ЗБТ Aniimo




Game24.pro — паблик игровых новостей в календарном формате на основе технологичной новостной информационно-поисковой системы с элементами искусственного интеллекта, гео-отбора и возможностью мгновенной публикации авторского контента в режиме Free Public. Game24.pro — ваши Game News сегодня и сейчас в Вашем городе.

Опубликовать свою новость, реплику, комментарий, анонс и т.д. можно мгновенно — здесь.