Compiling shaders every time I open a project

I’ve been having a strange problem recently. For some reason, every time I start up my project, the shaders have to compile. It’s usually around 5,000 or so. I searched the answer hub and help forum and couldn’t find anything that might specifically fix my problem, but here’s a couple of things I noticed.

  • The shaders that must compile involve the materials used in landscapes that blend different materials together. (For example, I have a Forest Material that blends different types of grass materials together.)
  • The game slows to a complete crawl if I try to run it while it’s compiling.
  • Trying to save a material while it’s compiling has a chance of causing it to lock up at 50%
  • Just by the design of my game, I have a large persistent level with many different sublevels. When I unhide these areas or go to them when playing in the viewport, I get “Texture Pool is Streaming Over” usually in the range 5 MB to 100 MB. This remains until I close the project.

THINGS I’VE TRIED

  • I’ve tried resaving all the materials
    and it had no effect.
  • I’ve deleted things like the Intermediate folder and the cache but it had no effect.
  • I’ve also verified the installation of UE4.

My guess is that the problem has to do with those landscape textures specifically, but I’m not sure what I would do to address it.

I don’t remember when this problem started, but I’ve been making biweekly to monthly backups of my game. I’m hesitant to migrate all my assets to another project because it’s pretty large in size and requires a lot of different textures. (Currently have about 300+ though a good chunk are leftovers from the starter content pack).

I’ve also attached my DxDiag if it’s necessary.

1 Like

I happened to try the solution posted on this thread and it worked for me! The project now starts up without having to recompile everything.

2 Likes

delete “DerivedDataCache” folder in your c: install directory, and it will help with fixing the problem.

1 Like

This worked for me as well. There should be a warning in the Output Log that leads you to the troubled material. In my case it said something like this.

MapCheck: Warning:
M_OpaqueSurface_Intuition Material
/Game/ProjectName/MaterialLibrary/IntuitionMaterials/M_OpaqueSurface_Intuition.M_OpaqueSurface_Intuition
was missing the usage flag
bUsedWithInstancedStaticMeshes. If the
material asset is not re-saved, it may
not render correctly when run outside
the editor. Fix

I just simply opened the material and compiled it again, making sure that the correct flag was enabled.

1 Like

This worked for me as well.

For anyone who visits this issue in the future…

One solution to try is filling the DDC cache up using the command-line

< path to >\Engine\Binaries\Win64\UE4Editor.exe < path to >\ProjectName -run=DerivedDataCache -fill

I noticed one of the plugins was throwing an exception during this process. After disabling and re-running, the cache successfully filled up and the project stopped recompiling shaders on startup.