Microsoft is developing an Advanced Shader Delivery system to eliminate lengthy shader compilation delays on PC games. The system automates the creation of a Precompiled Shader Database (PSDB) that works across many different PC graphics cards and drivers.
This database is downloaded with the game, aiming to provide console-like load times. It can also be updated automatically when new drivers are released, preventing recompilation on the player's machine.
The main topics covered are PC gaming performance, shader compilation, and Microsoft's technical solution to streamline the process.
Modern gamers are used to loading up a new game for the first time and being forced to wait multiple minutes while a “compiling shaders” step whirs away, optimizing advanced 3D effects for their specific hardware. This week at GDC, Microsoft provided some updates about its Advanced Shader Deliver for Windows efforts, which are designed to fix the problem by generating collections of precompiled shaders that can be downloaded ahead of time.
In a console environment, developers can optimize and precompile their graphics shaders to work well with a set driver and GPU environment. On PC, though, developers tend to leave their shaders as uncompiled code that can then be compiled and cached at runtime based on the specific hardware and drivers on the player’s machine.
Microsoft’s Advanced Shader Delivery infrastructure aims to fix this problem by automating the process of precompiling shaders that work across “a large matrix of drivers and GPUs in the Windows ecosystem,” as the company puts it. To enable that, developers use Microsoft’s Direct3D API to create a State Object Database (SODB) that represents in-game assets at the game engine level. That database of assets is then fed into multiple shader compilers to create a Precompiled Shader Database (PSDB) that supports multiple display adapters from different hardware vendors.
That PSDB can then be downloaded alongside the game, providing what Microsoft calls “console-like load times across the hardware ecosystem” on PC. That PSDB can also be automatically updated when hardware vendors register a driver update, letting players download a new precompiled shader as a patch rather than recompiling locally every time their hardware drivers change.