Hacker News new | ask | show | jobs
by Jasper_ 759 days ago
It is an issue with some modern games (I recently played a title that had a "Preparing Shaders..." loading screen); the main difference is that those games know the full set of what they need to do and can precompile most of them up-front, while an emulator like Dolphin needs to handle whatever the game throws it on the fly.

Also, games might know what shaders it can skip and what it can't, but Dolphin can't skip shaders if they aren't compiled, because it doesn't know what the game will do with the render (e.g. Miis work by rendering their heads once into a texture, and then reusing that. If it skips the render because the shader isn't ready, the Mii will just be missing forever).

Some emulators handle this by sharing "shader caches" between users so that they have a better idea of what the game will use; Dolphin opted for a different solution here.

1 comments

It’s not a problem for the PS/Xbox/Switch. They have known hardware and it can all be recompiled.

But from what I’ve heard it’s often still an issue on PCs (I’m a Mac guy). I’ve seen videos of shader compilation stutters, even in games with a precompilation step that’s supposed to avoid that.

Digital Foundry has covered this many times. The link in a sibling comment to them on Eurogamer is a great place to start.

Steam works around this by letting users enable shader precompilation in settings. If you want a console-like experience (eg. like Steam Deck) and you don't care so much about storage space, you can toggle it on and eliminate the stutter before booting up. Most people leave this off, which really ruins the experience on shader-heavy engines like UE4.

This is generally an everyone problem, though. If gaming on Mac was caught-up with where Linux is today, there would probably be a few precompilation steps there too. If you wanted to play Fallout 3 on your Android/iPhone device, it's the same story.

I’ve heard that helps a lot but I know new driver versions/etc can trigger a recompile. And the less common your setup the less likely it’s an issue.

I don’t think it’s an issue on Apple Silicon Macs(not sure) because like the iPhone there is a very tiny list of variables so precompiling is easy.