Disable shader baker when exporting as dedicated server

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.
This commit is contained in:
Hugo Locurcio
2025-11-04 00:25:08 +01:00
parent 06faefc9f4
commit 09f9dc157a
10 changed files with 14 additions and 4 deletions

View File

@@ -704,6 +704,7 @@
</member>
<member name="shader_baker/enabled" type="bool" setter="" getter="">
If [code]true[/code], shaders will be compiled and embedded in the application. This option is only supported when using the Forward+ or Mobile renderers.
[b]Note:[/b] When exporting as a dedicated server, the shader baker is always disabled since no rendering is performed.
</member>
<member name="ssh_remote_deploy/cleanup_script" type="String" setter="" getter="">
Script code to execute on the remote host when app is finished.

View File

@@ -63,7 +63,8 @@ void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset
ERR_PRINT("Invalid architecture");
}
if (p_preset->get("shader_baker/enabled")) {
if (!p_preset->is_dedicated_server() && p_preset->get("shader_baker/enabled")) {
// Don't use the shader baker if exporting as a dedicated server, as no rendering is performed.
r_features->push_back("shader_baker");
}