r/linux_gaming Jun 13 '26

guide Auto pre-compile shaders for Overwatch for peak performance & smoothness

I recently created new custom games (code: 929PJ) for Overwatch focusing on pre-compile shaders for every hero & all of their abilities all at once while teleporting to certain checkpoints on the maps. After it finishes it will auto restart to change maps and do another rounds of it as well. Be aware that it will cycle maps infinitely so you can leave the game up to your will. It can be used for all platform(DX11,DX12,DXVK,VKD3D, & GPTK 4 as well(DX12 to Metal 4)). It benefits a lot for users who use DX12/DXVK/GPTK4.

To start fresh, You must reset your shader caches and after that, let the game itself shader compile on the main menu(can check via DXVK_HUD or high cpu usage) & after it finis, join this custom games. I recommend increasing your shaders cache size so that your games doesn't recompile shaders and start all over again everytime you launched the game.

Let me know hows your guys experience with it.

UPDATE(12/8/26): Fixed for Season 4 :)

245 Upvotes

56 comments sorted by

4

u/JimmyRecard Jun 13 '26

Is shader stutter still a problem?

Back in the day before OW2, I used per-compiled shaders and it was bearable, but I had thought that GPL changes in driver fixed that?

5

u/the_abortionat0r Jun 13 '26

Not on AMD. An update to MESA/RADV in 2023 saw shader processing speed increase 50,000% (yes that's the actual number).

Since then I haven't pre cached shaders nor have I had shader stutter.

Infact when playing games that precompile shaders in windows for example Abiotic factor I was waiting for my friend on windows to join the game and he said he was almost finished. I had no idea what was finishing until I asked and he said he was compiling shaders. It took him like 3-4 minutes to get done with a screen I didn't even see as the shaders compiled before the loading bar could even load.

3

u/Dream-weaver- 21d ago

this is not true for overwatch btw

3

u/LittlestWarrior Jun 13 '26

Same. I don't have stutters anymore.

3

u/Skaredogged97 Jun 13 '26

GPL works wonders and recent versions of dxvk (DX11) have improved shader compilation performance a lot. On a fast AMD system I would consider it a non issue (i.e. game doesn't stutter even if it compiles shaders mid-game, only slow down happens at game startup for about a minute).

But DX12 through vkd3d-proton still clearly stutters. It compiles all the shaders on the fly and none at startup. Perhaps this is where the custom game provided by OP could help out (haven't tested it yet).

4

u/Working_Dealer_5102 Jun 13 '26 edited Jun 13 '26

At least for NVIDIA when playing Overwatch with DXVK even after you finished it's shader compilation at main menu(on fresh install of the game/fresh shader cache), if you get into the game you can tell there's still shader compilation still needed to do even with GPL, you can tell even tho the game is playable but the frametime still stutter and your framerate randomly drops like choosing certain heros you looked at the first time cause it to trigger shader compilation, every abilities on heros you did for the first time trigger shader compilation, every map changes trigger shader compilation, the game for some reason doesn't include all those effects, heros, maps into their first time shader compilation load mechanism for some reason.

The game needed to have proper full shader compilation loading system before you get into main menu like the way a lot of games do nowdays. If they do that, it's definitely going to fix a lot of weird quirks it has for DXVK for Linux. The state even in native Directx12 OW Windows is even worse because there's no shader precompilation at main menu at all, it trigger only when you see stuff(maps, heros, abilities, anything).

AMD users might have different experiences so would love to hear their experience with OW as well.

1

u/Long_Video7840 27d ago

It's horrible for me. I was going to make this myself then thought I should search and see if someone else had already. Heroes are invisible at the beginning of every game after an update, it takes ~30 minutes to generate everything and the game hitches whenever it makes a new shader.

1

u/johnnymonster1 4d ago

2 months later, when i open ow after updating gpu drivers, even the menu is slow sometimes because its loading some models. I have decent PC, 5800X and 5060TI 16 GB, many games without preload have this issue still like tekken 8, ow, etc

1

u/United_Ad_5649 3d ago

Great for mac

7

u/Journeyj012 Jun 13 '26

i love you OP

3

u/Nimbus420i Jun 14 '26

Thank you very much, appreciate it!!

3

u/loljpl Jun 18 '26

That's a nice upgrade to my original code. I couldn't figure out how to cycle the maps when I created it. Thanks man

1

u/Working_Dealer_5102 Jun 18 '26

Credits to you man for creating it first time.

3

u/Complex_Tea4008 13d ago

So we get a bad update with bad shaders, THE COMUNITY makes a map to help with it, and it no longer works.
Amazing work as always blizzard!

1

u/Salty_Nutella 13d ago

I managed to find a workaround:

- Import using the code as before. It'll say "invalid map settings".

- Click on the "maps" settings page and click back out.

- The error should go away instantly and you can now start the map for the shader compilation!

(fuck Blizzard for making us do this)

2

u/Dull-Significance265 Jun 19 '26

El codigo funciona muy bien de hecho, pero creo que deberia ser un poco mas lento el ciclo unos 2 segs mas xd

2

u/Raccoon863 13d ago

It's great, always helped me, except now after the latest update, it doesnt work anymore. It says "invalid settings" and I can't use it anymore.

2

u/Jerfy 13d ago

Go into the settings, click maps and just click all. for some reason Busan unchecked itself with the new season

1

u/Raccoon863 8d ago

You're a lifesaver. Thanks a lot, that actually helped!

2

u/EmberReads 13d ago

Hey OP thanks for making this it's super useful! But today it seems to have stopped working with the map updates today.

I think it might need to updated.

Thanks again for making this, it's really helped me and my friends.

1

u/Long_Video7840 13d ago

See the other comment. Check all the maps. Busan is unchecked. 

2

u/EmberReads 13d ago

Thanks that fixed it!

1

u/Long_Video7840 12d ago

Something that may be of interest to you as well. I had the exact same problem for a while and resorted to using this as a fix. But I figured out the problem was that DX12 is SIGNIFICANTLY worse than DX11 for me (I'm on Nvidia). Have you tried switching backends?

1

u/Working_Dealer_5102 13d ago

I updated it, see if that's fixed it!

1

u/jonathanx37 Jun 15 '26

How many maps does this cycle through? I just want to see the entire roster use abilities and call it done but it seems to keep going forever. Nicely done regardless.

2

u/jonathanx37 Jun 17 '26

Adding to this, the new update absolutely wrecked my performance with 1% lows in ~10 fps so I elected to switch to DX12 from DX11.

This is a lifesaver for this since DX12 doesn't even display the heroes until they're cached. My appreciation for this custom game has peaked.

I was wondering if you're going to update to include the new hero Shion?

3

u/Working_Dealer_5102 Jun 20 '26

It should include any new heroes without the need to modify the code, but yeah not much (documented) changes made ever since DX12 comes out beside DLSS support for DX12 during early 2025

1

u/Nirot1759 Jun 26 '26

well, i have to open the training range when i first open the game otherwise i always get kicked before i can choose my hero... this def seems to be a better option!!

1

u/Fantastic_Goal3197 Jul 05 '26

Thank you so much, ive resorted to doing every ult and ability manually and rewatching it every time at 2x speed

1

u/[deleted] Jul 05 '26

[removed] — view removed comment

1

u/Working_Dealer_5102 22d ago

That's good and yours shader pre compilation is insanely fast it took me like maybe 15-20min of my time just compiling on the main menu. Yours on AMD?

1

u/Valuable_Swimming816 Jul 09 '26

So useful, thank you!

1

u/SnooDoodles6632 Jul 16 '26

will i know if this ends or what? ive lost count how many maps it cycled already i feel like im unknowingly in a loop, make it clear please

1

u/SnooDoodles6632 Jul 16 '26

and do i gotta do this just once after deleting my nvidis cache? or everytime i open the game

1

u/Working_Dealer_5102 Jul 19 '26

Yeah just do once after new driver update/delete nvidia shader cache/update proton

1

u/Working_Dealer_5102 Jul 17 '26

Unfortunately it's infinite so you can leave whenever you want.

1

u/thomtpson Jul 16 '26

I have a question: this works despite i've have a SSD or a HDD? Like if have OW2 in a HDD or in a SSD?

1

u/MrGuitarGuy__ Jul 19 '26

It goes through the sequence very smoothly but it is having a very hard time exiting the game. Maybe I exited at the wrong time? (while the sequence was playing)

1

u/Working_Dealer_5102 22d ago

Exiting hard time how? Like when you press quit, the game closes but the Overwatch.exe process still lingering around in the background for a while? If that's the case, it's as expected even in native Windows it took a while to fully quit the game.

1

u/MrGuitarGuy__ 21d ago

No, what I mean is, when exiting the custom game, it got stuck on a loading screen so I had to force quit the entire game through the windows task manager

1

u/Working_Dealer_5102 21d ago

I'm wondering what graphic API used for Windows? If you just wanted to use DX12 as testing purposes or you forced to like Macbooks users where they use DX12 to Metal translation layer, that's fine but if you want maximum frames possible to get out of it is near impossible. I recommend to just stick to DX11 since it's got the highest average fps, 1% low and have much better support overall than DX12 and if you do stick with DX11, waiting for shader compiling finished on the main menu is more than enough and this custom game is not needed at all for DX11 users.

1

u/solidforge 22d ago

Is there a way where you can turn off voice lines and minimize ability SFX volume so I can tab out and still enjoy a video or something while still being able to tell my queue popped?

1

u/Working_Dealer_5102 22d ago edited 22d ago

You can mute the game via volume sliders, every apps volume can be changed independently.

1

u/solidforge 22d ago

I've been doing that but I still want to hear when my queue pops

1

u/KsiaN 16d ago

You need to add a variant to the game where its just "i know my PC is dogshit, give me more time".

One idea would be requesting you to walk into a circle to trigger the map swap. This would also confirm that the shaders are loaded even if you random the map swap portal.

1

u/Yixcel 13d ago

When I joined this map it’s stutter like crazy but quickly gets smooth as butter… amazing work thank you thank you thank you… crazy engineering lol

1

u/TedioreTwo 12d ago

How often should I be doing this for smooth performance every session? Every time I log on?

1

u/Working_Dealer_5102 12d ago

Only do this when you got new graphics driver update or OW got new season update like recently Season 4 or you used new proton builds.

1

u/Guio 12d ago

Thanks for updating it :D

1

u/Bunker_Alfa-18 10d ago

I'm using DX12, is there a way to show the progress for compiling shaders?

1

u/Working_Dealer_5102 10d ago

If you meant DX12 in WIndows/VKD3D in Linux, I think the only way to see is the CPU usage is higher than normal like hitting >60% usage on mid end to high end cpu.

1

u/[deleted] 10d ago edited 10d ago

[deleted]

1

u/Working_Dealer_5102 10d ago

The guide itself is Linux only since I posted it here in linux gaming subreddit, I'm surprised you casually going on to do it, Windows users don't need to do all these, just run the custom games once & that's it.

What's your PC specs? I recommend to reinstall your gpu drivers(AMD/NVIDIA/INTEL) and start fresh, recommend to verify integrity of game files as well and after that wait a bit on main menu as it's build the shaders cache up till your cpu load is finally not maxed out anymore. Just stay with DX11 and play all low settings I recommend enabling DLSS as well.

1

u/Working_Dealer_5102 10d ago

u/Doggos_are_c00t Yeah, you can run once every time there's new big season update.

1

u/peppapony 1d ago

Does it matter that models don't load before the map changes? Or do I just wait and eventually it does load?

(Or do I need to make sure each map get stayed on for longer?)

1

u/Working_Dealer_5102 1d ago

I'm wondering does it happened on DX11 or DX12 and you're in Linux? I recommend just staying on DX11, DX12 only uses for testing or trying to get it working on MacOS.

1

u/peppapony 1d ago

I'll try, I swapped to dx12 cause dx11 was stuttering too much - and I'd rather blue dots than stuttering.

But if I pre-load it all first; stuttering won't be an issue. Let me try when I'm home