# compiling shaders before render unreal engine 5.1

**URL:** <https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951>\
**Category:** Rendering\
**Tags:** unreal-engine, Rendering, Shaders, question\
**Created:** [February 2, 2023, 7:55am UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951 "2023-02-02T07:55:35Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![zpghost](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zpghost](https://forums.unrealengine.com/u/zpghost)\
**Post date:** [February 2, 2023, 7:55am UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/1 "2023-02-02T07:55:36Z")

</div>

After updating to 5.1, shaders are compiled before each render, sometimes 7k sometimes 2k shaders. Is it possible to disable shader compilation before rendering?

---

<div class="post-metadata">

**Author:** ![EliasWick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eliaswick/32/1175208_2.png) [@EliasWick](https://forums.unrealengine.com/u/EliasWick)\
**Post date:** [February 2, 2023, 9:36am UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/2 "2023-02-02T09:36:11Z")

</div>

**Someone managed to fix the issues by turning off Virtual Textures.**

* * *

_Source below: [UE 5.1 : Movie Render Queue - Compiling Shaders every frame - #12 by JayHPatel](https://forums.unrealengine.com/t/ue-5-1-movie-render-queue-compiling-shaders-every-frame/687369/12)_

> [JayHPatel](https://forums.unrealengine.com/u/JayHPatel)
> 
> Hi everyone, I had a similar issue today where MRQ was compiling shaders on every frame. I managed to fix that by turning off Virtual Textures. Hope that helps

---

<div class="post-metadata">

**Author:** ![zpghost](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zpghost](https://forums.unrealengine.com/u/zpghost)\
**Post date:** [February 2, 2023, 11:09am UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/3 "2023-02-02T11:09:32Z")

</div>

I have virtual textures disabled

---

<div class="post-metadata">

**Author:** ![EliasWick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eliaswick/32/1175208_2.png) [@EliasWick](https://forums.unrealengine.com/u/EliasWick)\
**Post date:** [February 2, 2023, 2:29pm UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/4 "2023-02-02T14:29:28Z")

</div>

I’m sorry, but I really don’t know what the issue could be then. Have you tried to launch a new project to see if it happens for every single project you run?

---

<div class="post-metadata">

**Author:** ![zpghost](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zpghost](https://forums.unrealengine.com/u/zpghost)\
**Post date:** [February 3, 2023, 10:58am UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/5 "2023-02-03T10:58:18Z")

</div>

this happens in new projects where there is only starter content, in 5.03 the render is started without compiling shaders.

---

<div class="post-metadata">

**Author:** ![EliasWick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eliaswick/32/1175208_2.png) [@EliasWick](https://forums.unrealengine.com/u/EliasWick)\
**Post date:** [February 3, 2023, 12:55pm UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/6 "2023-02-03T12:55:51Z")

</div>

I did some more digging. Updating to Unreal Engine 5.1 may cause shaders to recompile. However, you should never have to recompile shaders with every render you do.

To avoid this, you can try the following steps:

1. Clear the shader cache in the project settings under “Rendering” [What Is DirectX Shader Cache & Is It Safe to Delete? [Answered]](https://www.partitionwizard.com/resizepartition/directx-shader-cache.html)  
 ![bild](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/f/f/eff00931a887bba8e5e85fa94866d4ff89b61a65.png)

2. Delete the Intermediate, Saved, DerivedDataCache, and Binaries folders in your project directory.

3. Restart Unreal Engine

4. Try rendering your image again

If this doesn’t resolve the issue, it may be a bug in Unreal Engine 5.1. You can report it on the Unreal Engine team for further assistance.

---

<div class="post-metadata">

**Author:** ![zpghost](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zpghost](https://forums.unrealengine.com/u/zpghost)\
**Post date:** [February 27, 2023, 9:34am UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/7 "2023-02-27T09:34:13Z")

</div>

This did not solve the problem, compilation of shaders before rendering was introduced in 5.1 and it is not clear why it did not improve or speed up the rendering in any way, in 5.03 the renderer starts without compilation, the quality and rendering speed are the same

---

<div class="post-metadata">

**Author:** ![zpghost](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zpghost](https://forums.unrealengine.com/u/zpghost)\
**Post date:** [February 27, 2023, 9:36am UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/8 "2023-02-27T09:36:50Z")

</div>

Why do I have to wait 10-20 minutes for shaders to compile to render a scene built on starter content, developers can give an answer? why you need to compile shaders before rendering on 5.1, this is of no use

---

<div class="post-metadata">

**Author:** ![impostekno](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/impostekno/32/577500_2.png) [@impostekno](https://forums.unrealengine.com/u/impostekno)\
**Post date:** [March 8, 2023, 9:03am UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/9 "2023-03-08T09:03:15Z")

</div>

Any updates on this? Having a same issue with the scenes of my own!

---

<div class="post-metadata">

**Author:** ![PresumptivePanda](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/presumptivepanda/32/1194593_2.png) [@PresumptivePanda](https://forums.unrealengine.com/u/PresumptivePanda)\
**Post date:** [March 10, 2023, 4:30am UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/10 "2023-03-10T04:30:33Z")

</div>

Hi there @zpghost, hope you’re well!

This topic has been moved from **International** to **Rendering**.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! 🙂

---

<div class="post-metadata">

**Author:** ![EliasWick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eliaswick/32/1175208_2.png) [@EliasWick](https://forums.unrealengine.com/u/EliasWick)\
**Post date:** [March 12, 2023, 12:53pm UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/11 "2023-03-12T12:53:48Z")

</div>

Did you install the engine on the default location? Is the project located on the same drive as you have the engine installed to?

---

<div class="post-metadata">

**Author:** ![impostekno](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/impostekno/32/577500_2.png) [@impostekno](https://forums.unrealengine.com/u/impostekno)\
**Post date:** [March 13, 2023, 9:14am UTC](https://forums.unrealengine.com/t/compiling-shaders-before-render-unreal-engine-5-1/761951/12 "2023-03-13T09:14:46Z")

</div>

Hi @EliasWick,

No, the project is in a different location. Thing is I have couple of machines with this kind of configuration and they work pretty well.

The rest of the machines are a litteraly copy (VMs) of the working ones and they have the compilation issue on every render.
