UE5.1 First start after installation (Preparing shaders....)

Okay, some more googling seems to have shed at least some light on why it recompiles.
This topic from 2 years ago covers pretty much the same issue and apparently enabling Ray Tracing or any other major rendering feature forces shader recompile.

Thus, if you create a project with Ray Tracing enabled, it will have to recompile all the shaders, including the engine ones. At least on my end this seems to be consistent:

  • Creating a project with either scalability setting with Ray Tracing enabled always triggers 7k+ shaders compilation sequence;
  • Creating a project without Ray Tracing ticked launches it instantly;
  • Changing anything like Ray Tracing or Virtual Textures in a project created in 5.0.0 also triggers shader recompile.

Now the question is, why do we not have a precompiled set of Ray Tracing shaders? Is there some arcane technical limitation which makes it not possible to ship such a package in addition to the non Ray Tracing one? I understand that you can’t have all permutations compiled and served to you, but could we at least have the most common set of settings precompiled? I’m genuinely curious since I didn’t bother with Ray Tracing at all before this year.

For now I guess the solution would be to just create a project without Ray Tracing ticked on, setting up all rendering features that might trigger recompile (these usually prompt for engine restart) and then patiently waiting until shaders compile, since this will not happen again unless you toggle a major rendering feature.

Also, don’t forget to package early. It checks the shaders on the first packaging.