-
-
Notifications
You must be signed in to change notification settings - Fork 23.7k
Disable shader baker when exporting as dedicated server #112361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Disable shader baker when exporting as dedicated server #112361
Conversation
Dedicated server exports don't perform any rendering, so there's no point in including baked shaders. Doing so saves a few MBs in PCK size if the shader baker was enabled in the export options.
clayjohn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this just force disable "shader_baker/enabled" when using a dedicated server so that we don't have to add checks in multiple places?
Do you mean switching the export mode should automatically uncheck the If we can figure out a consistent way to do it, then it's probably a better idea. |
I think Clay was suggesting to replace: if (p_preset->get("shader_baker/enabled")) {with: if (p_preset->get("shader_baker/enabled") && !p_preset->is_dedicated_server()) {to always force skipping it without changing the configuration. CC @dsnopek |
This seems to be already what the PR is doing, except I think Clay was referring to a different location in the code (not sure which one). |
Dedicated server exports don't perform any rendering, so there's no point in including baked shaders. Doing so saves a few MBs in PCK size if the shader baker was enabled in the export options.
Testing project: test_export_dedicated_server.zip
Preview
File sizes in bytes for ZIP main packs before and after this PR:
I exported as ZIP so it's easy to inspect, but you get similar savings in PCK too.
client_master.zip
client_pr.zip
server_master.zip
server_pr.zip