What is shader compilation and why is it so prevalent now?

147 views

With the recent hubbub about The Calisto Protocol stuttering due to rampant “shader compilation”, I was recently reminded that other recent games (like Horizon Zero Dawn) were also known for shader compilation issues.

What is the game doing that makes it different from other games that just open and play without stutter or compilation?

I also don’t remember anyone making a fuss about this for titles 5 years ago.

In: 30

5 Answers

Anonymous 0 Comments

Let’s say you’re going hiking up the mountains for a few days. You know it’s going to be cold, so you definitely pack a jacket, a tent, and a sleeping bag, but you don’t necessarily know about all the other things you may need on the trip, so you bring a bunch of flexible essentials just in case: a knife, some kindling, flint and tinder, ready-to-eat snacks.

Shader compilation is deciding what to pack in your bags for that hike. If you do it right, you reach the peak, put on your sweater, set up your tent, prepare dinner. If you do it wrong, you’re on a cold mountain peak without a jacket so you go into a cave looking for a bear to kill so you can use its corpse to keep you warm while eating the remains. In both situations, you’re warm and fed, but one took longer and messier than if you’d known better and just packed some extra.

In a videogame, the right data (for photorealistic visuals) wasn’t properly prepared, so the game has to manually calculate that in real time, which locks up hardware and slows the game to a crawl.

You are viewing 1 out of 5 answers, click here to view all answers.