Shader compilation even more resource intensive than UE4

Is anyone else noticing shader compilation even more intensive than it was on Unreal Engine 4?
For instance, if I fresh install UE4, and open an old project so it has quite a few shaders to compile, I can do other stuff on my PC while itā€™s working with no issues.

With Unreal Engine 5, my PC stutters and almost comes to a grinding halt when itā€™s compiling shaders. Iā€™m lucky if I can even move my cursor sometimes during this process. I am on a Threadripper 3970X with 256 GB of RAM, so itā€™s kind of strange that it behaves like this.

Yup. I would call shader compilation in UE4/5 a crime against humanity. Just for the past few days UE5 has compiled more than 200,000 shaders despite the fact that my projects have only about 100 shaders and trashed my system SSD writing more than 30GB of useless data. I spent the most of my time with UE5 waiting for shader to compile or recompile because every change triggers recompilation.

2 Likes

Shaders are not materials

Nobody said shaders were materials. I know materials =! shaders, but when you make a material, it creates a shader using the material template shader, and making changes in your material causes the shaders created for the material to recompile. Fresh installing an engine, or deleting the engine/projects DDC also causes shader compilation. Changing something in one of the engines shaders also calls a full recompilation. Nobody said they were materials, we said compiling shaders is more intensive than it was on UE4. You can gauge roughly how many shaders your projects materials generate with a little digging around.

2 Likes

I mentioned that in a question during the UE5 stream. I stated it in question form asking why the CPU goes to 100% with repeated shader compiles with 0% usage of the GPU for assistance. Maybe they can fix it so the engine can check for a UE4 shader and upgrade it or use the GPU resources and RAM to assist compiles.

1 Like

i7 7700, EVGA 3080, 64GB DDR4, NVME, and SSD in use.
I do not have this issue.
I can continue to run the Dolphin emulator at 4K+ resolution with texture filtering while my CPU is at 100% and shaders are compiling. Iā€™m getting 60fps in the emulator. I can play Youtube, work in VS2019, Maya, 3DSMax, etc. Shader compilation doesnā€™t impact my system performance at all.

I agree, that shader compilation takes way too long, but I doubt there is much they can do about it. This has been a complaint for a long time that they never addressed, and Iā€™m sure theyā€™re aware of it.
It is incredibly frustrating though.

It does surprise me that @redlinejoe doesnā€™t have issues though, thatā€™s a 4-core cpu, and my understanding is that shader compilation times are based on CPU speed, not GPU or anything else.
Iā€™m wondering if that was a typo though, you do realize that a 3080 is severely handicapped by that cpu, but thatā€™s off-topic.

1 Like

My PC straight crashes here and I have better specs then a ton of people I see using UE5 on here and no one has said anything yet :confused:

Are you overclocking at all?
I donā€™t understand why, but in UE4 any overclocking led to random crashes, even when stable in every other app/game.
Maybe itā€™s a rare bug that has persisted to UE5.

Second reason of crashes after overclocking is how good quality PSU is and how much wattages PSU have compared to system consumption(inc GPU power spikes). If power spikes reach over PSU maximum much then crash is likely. Third is: bad combination of installed drivers.

For me, Unreal is only crashed itself but never took down whole system.

Ughā€¦ So I just fired up a shiny new Ryzen 5900x + RTX3090 + SSD and it is amazing! Then I opened UE5 and almost cried lol. Yeah, I have 24 pegged cores and no GPU activity. I would think there was a way to use the compute power of the GPU.

I havenā€™t yet looked into it in detail, but through some googling, I think there is possibly a workaround through ā€œIncredibuildā€. Visual Studio Build Tools & Integrations | Incredibuild
They have an integration for Unreal engine. In a nutshell, it looks to put some kind of agent on networked machines so you can use distributed computing over IP. Thereā€™s not a lot of details on the licensing other than you can get a ā€œfreeā€ one, but I donā€™t know if itā€™s free for home use, up to $X in sales, client machine count, etcā€¦

1 Like

From what I understand, itā€™s not really free. In fact, incredibuild is incredibly expensive. Unfortunately Epic hasnā€™t really seen fit to allow us to cluster shader compilation, which is a massive shame, especially seeing as how the shaders are getting more complex and taking much longer to compile. Zero advances on that front is kind of depressing.
They are going to need to either let us cluster build or something. Using the GPU to aid in compilation isnā€™t completely out of the question, but likely completely inefficient compared to CPU compilation (or maybe not, I dunno)

1 Like

Fastbuild is an open source and free alternative to Incredibuild.
I know there are ways to configure it to UE4(5?) but I donā€™t know if shader compiling can be distributed.
https://fastbuild.org

If youā€™re a Sony authorized developer they also have a tool you can use for free (on all platforms) to distribute the work.

2 Likes