Shader compilation stutter, and why the first run is the worst
Shaders are the small programs a graphics card runs to draw surfaces, light and effects. They arrive with the game in a general form and have to be compiled for your specific graphics card and driver before they can run.
- First run, 1% low 24 Rough
- Second run, 1% low 51 Playable
Many recent games compile them during a loading step the first time they start, which takes a few minutes but keeps play smooth. Others compile shaders while you play, the first time each effect appears on screen. Each one takes long enough to delay a frame, and you see it as a sharp hitch.
That is why the first fight, the first spell or the first visit to an area is often the worst. The compiled shaders are stored in a cache, so the same moment is smooth the second time.
A graphics driver update or a game patch usually clears that cache, and the stutter comes back until the shaders are compiled again. It is a common reason why a game feels worse right after an update and then recovers.
Not every hitch is shader compilation. Traversal stutter, where the game loads the next part of the world as you move, looks similar but happens in the same places every time, no matter how often you have been there.
What helps: let a precompile step finish before you start playing, keep the driver's shader cache size at its default or larger, and when you measure a game for a report, do not measure the first run after an update.