How is this acceptable? (compiling 8000+ shaders on a brand new installation)

And there you highlight the problem. Using the word “fundamental switch” for a feature like planar reflections gives insight in the kind of mindset required for developing in Unreal. There are a whole bunch of settings that are simply too expensive to iterate on; best left alone. It’s almost easier to experiment with these features in a different engine, and then come back to Unreal when you know what combination you might want.

And in forward rendering you can tell how slow these compiles are somehow. At least changes there don’t usually result in 9000 shaders to compile, but it hints at the issues with compilation speed. If it was fast, you wouldn’t notice that 9000 shaders had to compile.

Ok, if that’s the issue, I agree, experimenting with it is not fun.
But UE5 now has ODSC.
https://portal.productboard.com/epicgames/1-unreal-engine-public-roadmap/c/847-odsc-on-demand-shader-compilation

1 Like

Does this work with forward rendering?

these things for sure cause recompile
enabling: virtual tex, mesh distance fields, planar ref, adding a build platform

Switched from Unity to Unreal a few days ago and sitting in the same boat.
Wanted to prevent my GPU from exploding while working with UE5 by finding a way to reduce workload. Did never expect to sit here for an hour after switching to forward rendering.
I mean… wtf? Are you kidding me?

If your Engine takes forever to compile some shaders in a test project you have a problem.
If you can’t find an elegant way around this mega bug, then precompile them, load them up to a server and download them when needed.

It isn’t that everyone uses special stuff. This may come up after using this engine for a year or so but honestly… we all use the same stuff, right? I mean, all UE Games look pretty much the same. People doesn’t even change the postprocessing settings.

seriously
you can open a second unreal editor and work on another project
the shader compile doen’t slag every cpu cycle
I run both blender and zbrush together while it compiles and work on 10 million polys.

Build a unity project where every material has an advanced shadergraph and the same stuff has to happen.

1 Like

S-ed’s post wins the internets!
In order to disable this aggressive compilation in all of my projects, I even went ahead and added the line to the [SystemSettings] section of
C:\Program Files\Epic Games\UE_5.0\Engine\Config\Windows\WindowsEngine.ini itself:

[SystemSettings]
...
;Activate ODSC for all projects
r.ShaderCompiler.JobCacheDDC=1

Now after creating a new project with starter content, only 150 or so shaders get compiled! \O/
And if I put the JobCacheDDC=0 and reopen that project, sure enough a cr*p-ton of shaders get queued for compilation again.

7 Likes

This was the fix for me! Fixed the load time of the initial boot-up of UE5 and the load time for projects, where it was previously making me compile 8000 shaders that I had already compiled. Thanks a ton - I was about to quit Unreal Engine before even starting.

1 Like

This setting is a life-saver! Thanks for sharing @ProteanProds @S-ed!

You will recompile shaders if you change some settings in project settings or add new plugins to project, they also may change settings & force a recompile, some of those plugins are experimental so you could have a bug if it’s making you recompile shaders every load without making a change to anything.
The only time it’s recompiled the shaders once loaded was if I changed certain settings mainly graphic stuff to enhance materials & textures, but I have had plugins that I have added which also forced a full change which is not always to my liking.

Sorry for a late reply. It should. It’s an Editor setting that changes how shaders are queued for compilation (before it was by default to compile all at once, now only the shaders required for scene are compiled).

just wanted to add
adding “planar reflections” on a project set it off recompiling thousands of tex
I restarted and disabled planar and compiling stopped.

If it takes long id say your hardware is not up to date, last time i had to wait it was ± 12.000 shaders, and it took ± 15 minutes (on a laptop)

15 minutes is about a thousand times slower than this should be.

Also, blaming hardware is silly when this isn’t an issue in different game engines.

“I’m not sure why many people here having issues with compilation of shaders. It is a lot of shaders, but it rarely takes more than a hour to compile. Even 30000 shaders. PCIe SSD + 16-32 threads CPU is a must for non mobile Unreal project.”

Did you REALLY just say that?

1 Like

Is this issue still taken into account at Unreal ??? I’m a newbie, with a decent configuration, and desperately trying to experiment with no luck, shader compile time is above 10-15 minutes each time I create a blank project. This is absolutely insane… I quit !

Same thing here, my PC is not to bad, but still when I start Unreal Engine, it takes forever to compile shaders. Doesn’t really make sense to me, because it’s not opening a project, just the project overview… Then, after an hour, I can finally create a new, completely empty project, which again takes more then an hour. Why does it need to compile anything at all for basically nothing? Everything needed for an empty project should come with the engine right away, or am I mistaken? Some waiting I could understand, but opening a full testing world in under a minute in unity and not beeing able to load literally nothing in under two hours doesn’t make sense to me…

1 Like

@DeadEagleNL et al
This highlights the ridicule of the situation, as the majority of these scenes / blueprints / folder views will never be entered, and so there’s a whole lot of electricity wasted and pointless waiting for the editor to start because it’s stuck compiling shaders which will never be used :angry:

It is important to note that this happens anytime a rendering setting is changed where the editor has to restart, which makes it rather painful to try out varieties of combinations from the myriad of options which are available.

This setting of JobCacheDDC=1 was working ok in 5.0.
But a few more plugins were added in 5.1, and they appear to ignore this setting, as the number of shaders slated for compilation upon opening a freshly checked-out project with a completely empty map has jumped back up to around 5K :weary:

1 Like

Notice that here. It’s sucks. It’s impossible to work like that. That setting even helped me open the UE5, but when a try to create a new project is the same thing over again. I hope that someone come up with new ideas to solve this.