This year at gamescom, Microsoft is highlighting new gaming features coming for Windows, particularly for handheld devices. We want to highlight one of the DirectX team’s most exciting new contributions to the PC gaming ecosystem, which will make its debut on the new ROG Xbox Ally and ROG Xbox Ally X.
Advanced shader delivery addresses one of the most frustrating challenges for PC gamers today – long load times and disruptive stuttering during a game’s first launch. These delays are caused by the need to compile graphics shaders and cache them for future use. For a deep-dive on this topic, we recommend reading Epic’s article – “Game engines and shader stuttering.” We have partnered with teams across Xbox and at AMD to precompile this data and distribute it at download time for key titles via the Xbox PC app This approach not only gets you into your games faster, but it also prevents most instances of stutter that cause performance issues.
As an example, in Obsidian Entertainment’s Avowed, our engineering teams observed launch times reduced by as much as 85%. This not only means you’re playing your game faster, but your battery life is spent on playtime, not compiling.
Our initial launch of advanced shader delivery requires no work from game studios to integrate. As we expand support across more games and devices, we will collaborate with game developers to integrate the capability directly into game engines — ensuring games can take advantage of advanced shader delivery on launch day.
How does it work?
A game interacts with the GPU using programs called shaders, which are responsible for things like lighting, texturing, physics, and more. These shaders need to be compiled to a GPU-specific format –by sending them to the GPU driver in an intermediate form– before they can be used. Since these compiled shaders are specific to the game, GPU, and driver on a given device, it’s not traditionally been feasible to compile in advance – the best option so far is at game launch in the form of a loading screen, or else it needs to be done “just-in-time” which can cause stuttering. Once these shaders are compiled, they can be cached for subsequent runs of the game – until the driver updates and invalidates those caches.
To circumvent this issue, the DirectX team has created a method to collect the shader data from any given game and package it up in a new standardized format, called a State Object Database (SODB). We have worked with our key hardware partners to separate out the shader compiler from the graphics driver and unite the game data in the SODB with the compiler in the cloud to create a Precompiled Shader Database (PSDB). This PSDB can be distributed by the Xbox store alongside the game to supplement the shader cache. Now, when a game runs for the first time, it will see all the shaders it needs already available in a cache in Windows and can skip doing that compilation step on the gaming device. If a device takes a driver update, we will detect that and update the shader cache automatically.
To put it simply, we worked with our partners to take an expensive workload and move it from each gaming device into the cloud instead, to be distributed at download time.
What’s Next?
While we’re currently focused on supporting the launch of the ROG Xbox Ally and ROG Xbox Ally X, we’re excited to share that we’re releasing an AgilitySDK in September. This will provide both developers and gaming storefronts with the initial set of tools and APIs needed to expand this functionality across the industry. At that time, we will also provide more details on how developers can engage with this feature for in-market titles.
We’re also continuing to collaborate with our hardware partners to grow the number of devices that will be able to support advanced shader delivery. Stay tuned for more details on device expansion in September.
0 comments
Be the first to start the discussion.