# Compiling shaders every time I open a project

**URL:** <https://forums.unrealengine.com/t/compiling-shaders-every-time-i-open-a-project/412993>\
**Category:** Rendering\
**Tags:** engine-compile, unreal-engine, question\
**Created:** [December 23, 2017, 4:12pm UTC](https://forums.unrealengine.com/t/compiling-shaders-every-time-i-open-a-project/412993 "2017-12-23T16:12:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krayfishkarl](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krayfishkarl/32/595425_2.png) [@Krayfishkarl](https://forums.unrealengine.com/u/Krayfishkarl)\
**Post date:** [December 23, 2017, 4:12pm UTC](https://forums.unrealengine.com/t/compiling-shaders-every-time-i-open-a-project/412993/1 "2017-12-23T16:12:22Z")

</div>

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.

 ![224858-dxdiag.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/a/3/ba39a96d01cbb03bca2ba0040666c1fcfe4e364f.png)

---

<div class="post-metadata">

**Author:** ![Krayfishkarl](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krayfishkarl/32/595425_2.png) [@Krayfishkarl](https://forums.unrealengine.com/u/Krayfishkarl)\
**Post date:** [December 30, 2017, 3:42am UTC](https://forums.unrealengine.com/t/compiling-shaders-every-time-i-open-a-project/412993/2 "2017-12-30T03:42:21Z")

</div>

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.

> **[Foliage Recompiles Every Time](https://forums.unrealengine.com/questions/196330/foliage-recompiles-every-time.html)**
>
> Every time I open the editor for a project the shaders/materials for all of my foliage re compiles, with the exception of some grass meshes. The only thing I can think of is that I have non-foliage instances of those same meshes elsewhere in my...

---

<div class="post-metadata">

**Author:** ![wawoo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wawoo/32/750764_2.png) [@wawoo](https://forums.unrealengine.com/u/wawoo)\
**Post date:** [February 24, 2018, 4:48pm UTC](https://forums.unrealengine.com/t/compiling-shaders-every-time-i-open-a-project/412993/3 "2018-02-24T16:48:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ledii](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ledii](https://forums.unrealengine.com/u/Ledii)\
**Post date:** [August 18, 2020, 9:35am UTC](https://forums.unrealengine.com/t/compiling-shaders-every-time-i-open-a-project/412993/4 "2020-08-18T09:35:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![t58064255](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@t58064255](https://forums.unrealengine.com/u/t58064255)\
**Post date:** [March 10, 2022, 8:49am UTC](https://forums.unrealengine.com/t/compiling-shaders-every-time-i-open-a-project/412993/6 "2022-03-10T08:49:32Z")

</div>

This worked for me as well.

---

<div class="post-metadata">

**Author:** ![cannabis.cod3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cannabis.cod3r](https://forums.unrealengine.com/u/cannabis.cod3r)\
**Post date:** [July 22, 2022, 11:04pm UTC](https://forums.unrealengine.com/t/compiling-shaders-every-time-i-open-a-project/412993/7 "2022-07-22T23:04:07Z")

</div>

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.
