Microsoft’s Advanced Shader Delivery could change PC gaming forever

Microsoft aims to tackle one of PC gaming’s biggest issues, lowering first-run loading times and eliminating shader compilation stutter

Microsoft’s DirectX team is working hard to eliminate shader compilation stutters from PC games. With their new “Advanced Shader Delivery” (ASD) feature, Microsoft may finally be able to slay this beast, making PC gaming better for everyone.

Typically, modern PC games compile shaders when they are first booted, resulting in long initial loading times. When shaders aren’t pre-compiled, this process can happen during gameplay, resulting in momentary stutters. With ASD, Microsoft plans to precompile shader data and distribute it alongside games to compatible devices. This eliminates the need for gamers to compile shaders, decreasing initial loading times while removing shader compilation stutter.

For Obsidian Entertainment’s Avowed, this tech can reduce initial loading times by 85%. This change enables gamers to play their games faster, providing a better gaming experience.

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.

Microsoft

(This diagram shows how precompiled shaders (PSDBs) are delivered to the user on an ROG Xbox Ally or ROG Xbox Ally X – Source Microsoft)

How does Advanced Shader Delivery work?

Games interact with GPUs using shaders, and shaders need to be compiled in GPU-specific formats. This typically means that shaders need to be compiled by PC users, as shaders are game-specific, GPU-specific, and driver-specific. This is why games need to recompile shaders after a GPU driver update.

Currently, the best approach for most games is to compile shaders when the game launches. This compilation happens with a type of loading screen. Shaders can’t typically be compiled in advance or sent to users as a download.

To address this problem, Microsoft’s DirectX team has created a method to collect shader data from games and package this data up in a standardised format. This standard is called a “State Object Database” (SODB). Microsoft is working with hardware partners to separate shader compilers from graphics drivers. This allows Microsoft to combine its SODB data with a cloud-based compiler to create a Precompiled Shader Database (PCSD) for games. These shaders can then be distributed by storefronts like the Xbox Store alongside game data. This means that all necessary shaders will be given to users with their game downloads, allowing them to enter their games quickly and avoid shader compilation stutters.

If ADS is successful, Microsoft will solve one of PC gaming’s most annoying problems. However, it remains to be seen how well this system would work in practice.

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.

– Microsoft

Coming first to ROG Xbox Ally systems

For now, Microsoft is working to enable Advanced Shader Delivery for ASUS’ ROG Xbox Ally handhelds. In time, this feature will be supported on more hardware configurations. In September, Microsoft plans to release a new AgilitySDK that will provide game developers and gaming storefronts with an “initial set of tools and APIs” that will help them adopt this feature.

Microsoft is also working with hardware partners to grow the number of devices that will support Advanced Shader Delivery. We can expect to hear more about this next month.

You can join the discussion on Microsoft’s “Advanced Shader Delivery” feature on the OC3D Forums.

Mark Campbell

Mark Campbell

A Northern Irish father, husband, and techie that works to turn tea and coffee into articles when he isn’t painting his extensive minis collection or using things to make other things.

Follow Mark Campbell on Twitter
View more about me and my articles.

Uh-oh! It looks like you're using an ad blocker.

OC3D relies on ads to provide free content and sustain our operations. By white listing us on your ad blocker, you help support us and ensure we can continue offering valuable content without any cost to you. We only run our own hand picked ads from Industry brands like MSI, BeQuiet, Sapphire and PC-Specialist - meaning they are all relevent to the content you are reading.

We truly appreciate your understanding and support. Thank you for considering whitelisting OC3D