Skip to content

Conversation

@Calinou
Copy link
Member

@Calinou Calinou commented Nov 3, 2025

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:

1799328 client_master.zip
1793511 client_pr.zip

1791818 server_master.zip
   2056 server_pr.zip

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

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.
@Calinou Calinou added this to the 4.6 milestone Nov 3, 2025
@Calinou Calinou requested review from a team as code owners November 3, 2025 23:27
@Calinou Calinou requested review from a team as code owners November 3, 2025 23:27
@Calinou Calinou added topic:export cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Nov 3, 2025
Copy link
Member

@clayjohn clayjohn left a 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?

@Calinou
Copy link
Member Author

Calinou commented Nov 5, 2025

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 shader_baker/enabled option if it's currently checked? This may lead to inconsistent state if you check it later on, unless we hide the checkbox while the export mode is set to Export as dedicated server.

If we can figure out a consistent way to do it, then it's probably a better idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release topic:editor topic:export topic:rendering

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shader baker still exports a shader cache for dedicated server exports

2 participants