# PREPARING SHADERS or PRE-COMPILING SHADERS before booting-up the PACKAGED GAME for the FIRST TIME...

**URL:** <https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388>\
**Category:** Programming & Scripting\
**Tags:** compiling-shaders, unreal-engine, packaged-game, Shaders, question\
**Created:** [April 26, 2024, 6:18pm UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388 "2024-04-26T18:18:53Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jade2619](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jade2619/32/939674_2.png) [@Jade2619](https://forums.unrealengine.com/u/Jade2619)\
**Post date:** [April 26, 2024, 6:18pm UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/1 "2024-04-26T18:18:53Z")

</div>

I’ve made a game and released it on Steam. But the most annoying bug I’m facing is that the game crashes everytime somone tries to load the game for the first time. After further inspection, I’ve figured out that the games are supposed to prepare shaders or pre-compile shaders at the startup of the game. It’s like the new last of us pc port, lies of p and even Hogwarts Legacy (which is made in ue5).

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/d/4/bd4041d7be5c4bf987f5ff8ce4239a0691815406.jpeg)  
This is the opening screen from Hogwarts Legacy.

How can I do the same with my game, i.e. prepare all the shaders and compile them so that the game boots up normally? Please devs let me know…

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [April 27, 2024, 3:23pm UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/2 "2024-04-27T15:23:51Z")

</div>

I really don’t know why, but making a shipping package from the normal menus doesn’t actually do what it says.

You need to use the Launcher from the tools menu, then everything gets baked, and this won’t happen

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/3/2a34b51094e9e45c7e107ded4926b0d43dc3a6a3.jpeg "How to use Project Launcher to package a game in UE5") ](https://www.youtube.com/watch?v=XAtOXmyqq18)

EDIT: I had this wrong, quite often AAA games now compile shaders after installation. It because of a the variety of different GPUs.

---

<div class="post-metadata">

**Author:** ![Jade2619](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jade2619/32/939674_2.png) [@Jade2619](https://forums.unrealengine.com/u/Jade2619)\
**Post date:** [May 4, 2024, 12:53pm UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/3 "2024-05-04T12:53:57Z")

</div>

Okayy I’ll try that. BTW not every scene in my game needed baking. Some levels have dynamic lightings.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 4, 2024, 12:57pm UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/4 "2024-05-04T12:57:12Z")

</div>

The baking also means ‘pre-compile shaders’… 🙂

---

<div class="post-metadata">

**Author:** ![Jade2619](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jade2619/32/939674_2.png) [@Jade2619](https://forums.unrealengine.com/u/Jade2619)\
**Post date:** [May 6, 2024, 9:15am UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/5 "2024-05-06T09:15:01Z")

</div>

Oh okay my bad😅

---

<div class="post-metadata">

**Author:** ![Jade2619](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jade2619/32/939674_2.png) [@Jade2619](https://forums.unrealengine.com/u/Jade2619)\
**Post date:** [May 12, 2024, 8:09am UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/6 "2024-05-12T08:09:59Z")

</div>

Hi. I’ve been trying this method for quite a while and I’ve stumbled accros a thing which may not be an issue but I thought I should let you know. When I used the packaged launcher to package my game, the size of the game nearly doubled out. Previously my game is only 4.6 gb. Now it became 8 gb in storage. Is it an issue or just the baked data takes the additional space? I thought I should let you know because my game is not that big to take up 8 gb storage. It only contains 1 level. So by consumer point of view it look bizare to get a small game that takes 8 gb storage.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 12, 2024, 8:30am UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/7 "2024-05-12T08:30:42Z")

</div>

I would have though smaller 🤔

Have you changed anything? One tweak can double the size of the game, if you have created an asset chain, for instance.

---

<div class="post-metadata">

**Author:** ![Jade2619](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jade2619/32/939674_2.png) [@Jade2619](https://forums.unrealengine.com/u/Jade2619)\
**Post date:** [May 13, 2024, 7:14am UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/8 "2024-05-13T07:14:25Z")

</div>

I haven’t changed anything. I used project package earlier, then I simply used the project launcher that’s it.

> [@ClockworkOcean](#):
>
> asset chain

Though can you tell me what is an asset chain

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 13, 2024, 7:18am UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/9 "2024-05-13T07:18:07Z")

</div>

An asset chain is when asset A refers to asset B, and that refers to asset C and…

Sometimes they even loop 🙂

The two ways you might find it are

1. Try looking at the size map of your levels, right click in the content browser. Are they much larger than they should be?

2. Take a look in the reference viewer, also right click in the browser. It shows you which objects are linked.

---

<div class="post-metadata">

**Author:** ![HishamYey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HishamYey](https://forums.unrealengine.com/u/HishamYey)\
**Post date:** [May 19, 2024, 9:15am UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/10 "2024-05-19T09:15:01Z")

</div>

bro you dont get it this option only prepares the shaders for your hardware bro everyone is defferent and we want to compile once for every player pc wich is better than the stuttery unreal engine compiler on the go

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 19, 2024, 9:22am UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/11 "2024-05-19T09:22:12Z")

</div>

Do you ever see shaders compiling in a AAA game?

---

<div class="post-metadata">

**Author:** ![Jade2619](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jade2619/32/939674_2.png) [@Jade2619](https://forums.unrealengine.com/u/Jade2619)\
**Post date:** [May 20, 2024, 12:25pm UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/12 "2024-05-20T12:25:32Z")

</div>

That’s what I’ve been asking. All games u see now a days, lies of p, hogwarts legacy, last of us pc, they compile shaders at the beginning of the game only. But the mod didn’t got what I’m asking I guess…

---

<div class="post-metadata">

**Author:** ![Jade2619](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jade2619/32/939674_2.png) [@Jade2619](https://forums.unrealengine.com/u/Jade2619)\
**Post date:** [May 20, 2024, 12:26pm UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/13 "2024-05-20T12:26:33Z")

</div>

We’ve seen pre compiling shaders in lies of p or something like that. I’ve even shares the ss to make a reference to what I was asking.

---

<div class="post-metadata">

**Author:** ![HishamYey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HishamYey](https://forums.unrealengine.com/u/HishamYey)\
**Post date:** [May 20, 2024, 7:06pm UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/14 "2024-05-20T19:06:54Z")

</div>

yes i do horizon forbidden west does compile shaders and not only on beggining but on every startup ghost of tsushima also compiles shaders like we want call of duty warzone 3 also compiles shaders in the beggining and also fortnite has an option for you to download precompiled game assets also horizon zero dawn all of call of duty games actually all off them isnt that enough for you?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 20, 2024, 7:41pm UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/15 "2024-05-20T19:41:23Z")

</div>

Ok, we’re playing different games 🙂

I’m pretty sure packaging without the launcher will not give you an optimal experience, and leaves a lot of gaping holes, like being able to run console commands and not disabling print nodes ( two obvious ones - last time I tried it ).

With the Launcher, I do think a lot is done up front, which possibly explains the size increase that @Jade2619 saw. And the other problems are fixed. But some things will need to be done on the target hardware.

---

<div class="post-metadata">

**Author:** ![HishamYey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HishamYey](https://forums.unrealengine.com/u/HishamYey)\
**Post date:** [May 21, 2024, 8:14am UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/16 "2024-05-21T08:14:08Z")

</div>

its not packaging without the launcher its just compiling shaders 👍

---

<div class="post-metadata">

**Author:** ![Jade2619](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jade2619/32/939674_2.png) [@Jade2619](https://forums.unrealengine.com/u/Jade2619)\
**Post date:** [May 26, 2024, 12:37am UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/17 "2024-05-26T00:37:27Z")

</div>

Dude just refusing to understand​:joy:😂

---

<div class="post-metadata">

**Author:** ![zelda](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zelda](https://forums.unrealengine.com/u/zelda)\
**Post date:** [May 27, 2024, 1:27am UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/18 "2024-05-27T01:27:53Z")

</div>

Could this be a similar issue?

[fps drop](https://forums.unrealengine.com/t/fps-drop-in-my-packaged-game/1873226)

---

<div class="post-metadata">

**Author:** ![Jade2619](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jade2619/32/939674_2.png) [@Jade2619](https://forums.unrealengine.com/u/Jade2619)\
**Post date:** [May 27, 2024, 7:05am UTC](https://forums.unrealengine.com/t/preparing-shaders-or-pre-compiling-shaders-before-booting-up-the-packaged-game-for-the-first-time/1823388/19 "2024-05-27T07:05:07Z")

</div>

I replied to your post there you can check
