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

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).


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…

2 Likes

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

2 Likes

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

1 Like

The baking also means ‘pre-compile shaders’… :slight_smile:

Oh okay my bad😅

1 Like

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.

1 Like

I would have though smaller :thinking:

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

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

Though can you tell me what is an asset chain

1 Like

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

Sometimes they even loop :slight_smile:

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.

1 Like

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

1 Like

Do you ever see shaders compiling in a AAA game?

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…

1 Like

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.

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?

2 Likes

Ok, we’re playing different games :slight_smile:

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.

its not packaging without the launcher its just compiling shaders :+1:

Dude just refusing to understand​:joy::joy:

Could this be a similar issue?

fps drop

I replied to your post there you can check