• Home
  • About
  • Guides
  • Games
    • Integrated Graphics [iGPU]
  • Hardware
    • Handheld PCs
  • Consoles
  • Steam Deck
What's Hot

Is FPS Aim Better on Controller or Mouse?

October 1, 2023

What Are Hall Effect Analog Sticks?

October 1, 2023

Can You Play Games From an External Hard Drive?

October 1, 2023
Trending
  • Is FPS Aim Better on Controller or Mouse?
  • What Are Hall Effect Analog Sticks?
  • Can You Play Games From an External Hard Drive?
  • Best Sonic Generations Mods: Definitive Guide
  • Ranking the Best Handheld Gaming PCs in 2023 [Steam Deck vs ASUS ROG Ally vs Lenovo Legion Go]
  • Gaming PC vs Gaming Console — Which Should You Buy?
  • Is the Lenovo Legion Go Worth It? — In-Depth Breakdown
  • Are Handheld Emulators Worth It? Your Options Explained
GamersDirectorGamersDirector
Facebook Twitter
  • Home
  • About
  • Guides

    Best Sonic Generations Mods: Definitive Guide

    September 26, 2023

    What is Ambient Occlusion in Games? [Explained With Examples]

    January 26, 2023

    What is Triple Buffering and should you use it?

    December 21, 2022

    What is Global Illumination in Games? [Explained With Examples]

    November 4, 2022

    Team Fortress 2: Optimization Guide and More

    October 13, 2022
  • Games
    1. Integrated Graphics [iGPU]
    2. View All

    Are Integrated Graphics Good for Gaming?

    September 14, 2023

    Can You Play Ratchet and Clank Rift Apart on Integrated Graphics & Steam Deck?

    August 1, 2023

    Can You Play Lies of P on Integrated Graphics & Steam Deck? [iGPU]

    June 12, 2023

    Can You Run Street Fighter 6 on Integrated Graphics? [iGPU]

    April 28, 2023

    Best Sonic Generations Mods: Definitive Guide

    September 26, 2023

    Are Integrated Graphics Good for Gaming?

    September 14, 2023

    Can You Play Ratchet and Clank Rift Apart on Integrated Graphics & Steam Deck?

    August 1, 2023

    Gaming on macOS — 6 Different Ways [Native, Game Porting Toolkit, Emulators, etc.]

    June 24, 2023
  • Hardware
    • Handheld PCs
  • Consoles
  • Steam Deck

    Do Mods Work on Steam Deck?

    September 16, 2023

    Best Steam Deck Accessories

    September 4, 2023

    Can Steam Deck Play AAA Games?

    June 15, 2023

    How to Get Steam Deck Plugins With Decky Loader

    May 21, 2023

    How To Fix Steam Deck Screen Colors

    May 19, 2023
GamersDirectorGamersDirector
Home»Steam Deck»What is Steam Deck Shader Pre-Caching?
Steam Deck

What is Steam Deck Shader Pre-Caching?

By Christopher HarperAugust 12, 2022Updated:November 4, 20226 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email

What is Steam Deck shader pre-caching, and what makes it so important to the system’s functionality? To explain this, I’ll need to break down what a shader actually is, as well as some deeper aspects of how the Steam Deck works. Let’s get into it!

Table of Contents

  • What are Shaders?
  • What is Valve Proton?
  • How does Proton work on Steam Deck?
  • What is Steam Deck Shader pre-caching?
  • How does shader pre-caching improve performance on Steam Deck?
  • Parting Words

What are Shaders?

A flat shader vs a phong shader.
A flat shader vs a phong shader.

Shaders are a little complicated to explain without doing a deep dive into how 3D rendering works, but let’s start with their basic function when it comes to 3D rendering. Shaders are responsible for a great deal of the lighting and shading that goes into a given 3D scene. Some shaders are fairly simple and others are fairly complex, but in either case they’re an integral part of any 3D game you might be playing.

Interestingly, shaders also come with a few caveats. Over on consoles, for instance, basically every shader functionality is programmed into the GPU ahead of time. With PC games, this is instead done through a graphics API like DirectX, Vulkan, or OpenGL, but the concept is similar. Most shaders do not have to be compiled in real-time when you’re playing games, because if they were, you would be faced with rather severe stutters in framerate- like, the entire game stopping until the shader is done rendering for the first time.

In the world of emulation, this shader compilation stutter is quite common. Because the original console hardware and its shader management is inaccessible, emulators are instead required to compile shaders in real-time if workarounds aren’t put in place.

For example, users of the Cemu Wii U Emulator were often required to share and download pre-compiled shader caches if they wanted to play through games without experiencing these stutters. As another example, the Dolphin GameCube and Wii Emulator was prone to unplayable shader stutter, but only in certain games where new shaders were being introduced frequently.

The workaround to these shader compilation issues for emulators ended up being fairly complex.

Dolphin ended up coming up with a solution called Ubershaders in 2017, which addresses stuttering fairly well but is still very performance-intensive. Hybrid Mode Ubershaders are less performance-intensive and still fix stutter, but result in missing graphics in certain scenarios due to the reliance on asynchronous shader compilation. More on that in a moment.

Cemu just ended up implementing asynchronous shader compilation through the Vulkan graphics API. Asynchronous just means new shaders are still compiled in real-time, but separately from the main game. However, as noted above with Dolphin’s implementation, async shaders can result in missing graphics while the shaders are being compiled. This is still better than full game stutters every time a new shader pops up, though.

Ssync shaders
GIF Credit: Cemu Project. Example of async shaders being compiled in real time, but slowly.

Fortunately, shaders aren’t all bad when it comes to performance. In the case of console hardware, shaders are great for performance since developers can program around the same basic hardware for every user.

And even outside of consoles, on PC, a shader cache is generated after a shader is compiled for the first time, preventing it from causing stutter whenever it’s used again.

Remember the shader cache- it’ll come up again very soon. For now, I need to take a moment to talk about Proton.

What is Valve Proton?

Valve Proton is a compatibility layer for Linux operating systems that translates Windows games through the open-source Vulkan graphics API, so they can be played without Windows. Proton has been a work-in-progress for many years, but has fairly good compatibility with a wide range of games, and has greatly improved the pool of PC games that can reasonably be played on Linux.

If Proton sounds a little similar to WINE, another Linux compatibility layer for running Windows programs, that’s because it is! WINE is the foundation upon which Proton is built, and Proton wouldn’t exist without it.

How does Proton work on Steam Deck?

A key piece of the puzzle for Steam Deck is its reliance on Proton. Since Steam Deck doesn’t run Windows and is instead using a custom version of Arch Linux dubbed Steam OS 3.0, Steam Deck is reliant on Proton for any game that isn’t already made to run on Linux.

This isn’t a bad thing. In the majority of cases, games on Steam Deck run about as good and sometimes slightly better on Steam OS than on Windows.

In fact, Windows games that have shader compilation stutter problems, like Elden Ring, actually run better on Steam Deck and Steam OS than Windows! Let’s get into what makes that possible.

What is Steam Deck Shader pre-caching?

shader pre-caching update being downloaded
A shader pre-caching update being downloaded before a game on Steam Deck.

Since we’ve established the ideas of shaders and shader caches, you probably have a good idea of what this means, now. Basically, Steam Deck shader pre-caching is Steam’s way of pre-downloading a shader cache for a given game, allowing it to be played without shader compilation stutter interfering with gameplay or reducing performance.

How does shader pre-caching improve performance on Steam Deck?

Since Steam Deck isn’t being forced to compile shaders in real-time, Steam Deck is able to maintain steady performance in intensive scenarios where lots of new shaders are being introduced. This is actually what makes Elden Ring work so well on the low-powered Steam Deck with less stuttering than high-end Windows PCs. Even though you can’t quite push 60 FPS in Elden Ring on Steam Deck, it still stutters less than the Windows version of the game.

For more on how Steam Deck shader pre-caching works and how Valve has been able to optimize games for the Deck like a console, I highly recommend the Digital Foundry video embedded below.

Digital Foundry has done a deep dive into how Elden Ring was “fixed” on Steam Deck, and shader pre-caching is part of what made that possible.

Parting Words

And that’s it, for now! I hope this article helped illuminate a bit more about how the Steam Deck works, especially if you’ve recently purchased one and have been noticing those shader pre-caching updates popping up. Don’t worry if you notice that your Steam Deck runs a shader pre-caching update more than once- this usually just happens whenever your system is updated and the underlying Proton and Vulkan files need to be replaced.

Want more Steam Deck content? Consider giving my Steam Deck optimization guide a look, or check my article on How To Set Up Moonlight on Steam Deck if you want to stream non-Steam games from your PC to your Deck.

Until then or until next time, have a good one!

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Previous ArticleHeadphones vs Headset For Gaming – Which do you need?
Next Article Best Steam Deck Verified Games and What To Do If Your Game Isn’t Verified
Christopher Harper
  • LinkedIn

Christopher Harper is a lifelong gaming and tech enthusiast. Starting with Super Mario 64 and Tekken 3 at a mere three years old, Christopher has since pursued the cutting-edge of games that are, above all, fun to play and respectful of your time and intelligence. His more hardware-centric guides elsewhere on the web are still mindful of these goals.

Related Posts

Steam Deck

Do Mods Work on Steam Deck?

September 16, 2023By Christopher Harper
Steam Deck

Best Steam Deck Accessories

September 4, 2023By Christopher Harper
Handheld PCs

Can Steam Deck Play AAA Games?

June 15, 2023By Christopher Harper
Latest Posts

Is FPS Aim Better on Controller or Mouse?

October 1, 2023

What Are Hall Effect Analog Sticks?

October 1, 2023

Can You Play Games From an External Hard Drive?

October 1, 2023

Best Sonic Generations Mods: Definitive Guide

September 26, 2023
Featured Posts
Retro Gaming

Are Handheld Emulators Worth It? Your Options Explained

By Christopher Harper
Laptops

Gaming PC vs Gaming Laptop — Which Should You Buy?

By Petar Vukobrat
Laptops

Best Gaming Laptop Brands

By Petar Vukobrat
Advertisement
Facebook Twitter
© 2023 GamersDirector. All rights reserved.

Type above and press Enter to search. Press Esc to cancel.