Add shader baker to project exporter.
Metal Support contributed by Migeran (https://migeran.com) and Stuart Carnie. Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com> Co-authored-by: Gergely Kis <gergely.kis@migeran.com>
This commit is contained in:
@ -613,6 +613,9 @@
|
||||
<member name="screen/support_xlarge" type="bool" setter="" getter="">
|
||||
Indicates whether the application supports extra large screen form-factors.
|
||||
</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.
|
||||
</member>
|
||||
<member name="user_data_backup/allow" type="bool" setter="" getter="">
|
||||
If [code]true[/code], allows the application to participate in the backup and restore infrastructure.
|
||||
</member>
|
||||
|
||||
@ -1967,6 +1967,10 @@ void EditorExportPlatformAndroid::get_preset_features(const Ref<EditorExportPres
|
||||
r_features->push_back("etc2");
|
||||
r_features->push_back("astc");
|
||||
|
||||
if (p_preset->get("shader_baker/enabled")) {
|
||||
r_features->push_back("shader_baker");
|
||||
}
|
||||
|
||||
Vector<ABI> abis = get_enabled_abis(p_preset);
|
||||
for (int i = 0; i < abis.size(); ++i) {
|
||||
r_features->push_back(abis[i].arch);
|
||||
@ -2063,6 +2067,13 @@ String EditorExportPlatformAndroid::get_export_option_warning(const EditorExport
|
||||
if (!bool(p_preset->get("package/show_in_app_library")) && !gradle_build_enabled) {
|
||||
return TTR("\"Use Gradle Build\" must be enabled to disable \"Show In App Library\".");
|
||||
}
|
||||
} else if (p_name == "shader_baker/enabled") {
|
||||
String export_renderer = GLOBAL_GET("rendering/renderer/rendering_method.mobile");
|
||||
if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
|
||||
return TTR("\"Shader Baker\" is not supported when using the Compatibility renderer.");
|
||||
} else if (OS::get_singleton()->get_current_rendering_method() != export_renderer) {
|
||||
return vformat(TTR("The editor is currently using a different renderer than what the target platform will use. \"Shader Baker\" won't be able to include core shaders. Switch to the \"%s\" renderer temporarily to fix this."), export_renderer);
|
||||
}
|
||||
}
|
||||
}
|
||||
return String();
|
||||
@ -2130,6 +2141,8 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "graphics/opengl_debug"), false));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "shader_baker/enabled"), false));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/xr_mode", PROPERTY_HINT_ENUM, "Regular,OpenXR"), XR_MODE_REGULAR, false, true));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "gesture/swipe_to_dismiss"), false));
|
||||
|
||||
@ -726,6 +726,9 @@
|
||||
<member name="privacy/user_defaults_access_reasons" type="int" setter="" getter="">
|
||||
The reasons your app use user defaults API. See [url=https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api]Describing use of required reason API[/url].
|
||||
</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.
|
||||
</member>
|
||||
<member name="storyboard/custom_bg_color" type="Color" setter="" getter="">
|
||||
A custom background color of the storyboard launch screen.
|
||||
</member>
|
||||
|
||||
@ -26,6 +26,9 @@
|
||||
<member name="debug/export_console_wrapper" type="int" setter="" getter="">
|
||||
If [code]true[/code], a console wrapper is exported alongside the main executable, which allows running the project with enabled console output.
|
||||
</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.
|
||||
</member>
|
||||
<member name="ssh_remote_deploy/cleanup_script" type="String" setter="" getter="">
|
||||
Script code to execute on the remote host when app is finished.
|
||||
The following variables can be used in the script:
|
||||
|
||||
@ -695,6 +695,9 @@
|
||||
<member name="privacy/tracking_enabled" type="bool" setter="" getter="">
|
||||
Indicates whether your app uses data for tracking. See [url=https://developer.apple.com/documentation/bundleresources/privacy_manifest_files]Privacy manifest files[/url].
|
||||
</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.
|
||||
</member>
|
||||
<member name="ssh_remote_deploy/cleanup_script" type="String" setter="" getter="">
|
||||
Script code to execute on the remote host when app is finished.
|
||||
The following variables can be used in the script:
|
||||
|
||||
@ -63,6 +63,10 @@ void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset
|
||||
ERR_PRINT("Invalid architecture");
|
||||
}
|
||||
|
||||
if (p_preset->get("shader_baker/enabled")) {
|
||||
r_features->push_back("shader_baker");
|
||||
}
|
||||
|
||||
if (architecture == "universal") {
|
||||
r_features->push_back("x86_64");
|
||||
r_features->push_back("arm64");
|
||||
@ -99,6 +103,15 @@ String EditorExportPlatformMacOS::get_export_option_warning(const EditorExportPr
|
||||
}
|
||||
}
|
||||
|
||||
if (p_name == "shader_baker/enabled") {
|
||||
String export_renderer = GLOBAL_GET("rendering/renderer/rendering_method");
|
||||
if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
|
||||
return TTR("\"Shader Baker\" is not supported when using the Compatibility renderer.");
|
||||
} else if (OS::get_singleton()->get_current_rendering_method() != export_renderer) {
|
||||
return vformat(TTR("The editor is currently using a different renderer than what the target platform will use. \"Shader Baker\" won't be able to include core shaders. Switch to the \"%s\" renderer temporarily to fix this."), export_renderer);
|
||||
}
|
||||
}
|
||||
|
||||
if (p_name == "codesign/certificate_file" || p_name == "codesign/certificate_password" || p_name == "codesign/identity") {
|
||||
if (dist_type == 2) {
|
||||
if (ad_hoc) {
|
||||
@ -468,6 +481,8 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "application/export_angle", PROPERTY_HINT_ENUM, "Auto,Yes,No"), 0, true));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "display/high_res"), true));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "shader_baker/enabled"), false));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "application/additional_plist_content", PROPERTY_HINT_MULTILINE_TEXT), ""));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "xcode/platform_build"), "14C18"));
|
||||
|
||||
@ -578,6 +578,9 @@
|
||||
<member name="privacy/user_defaults_access_reasons" type="int" setter="" getter="">
|
||||
The reasons your app use user defaults API. See [url=https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api]Describing use of required reason API[/url].
|
||||
</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+ and Mobile renderers.
|
||||
</member>
|
||||
<member name="user_data/accessible_from_files_app" type="bool" setter="" getter="">
|
||||
If [code]true[/code], the app "Documents" folder can be accessed via "Files" app. See [url=https://developer.apple.com/documentation/bundleresources/information_property_list/lssupportsopeningdocumentsinplace]LSSupportsOpeningDocumentsInPlace[/url].
|
||||
</member>
|
||||
|
||||
@ -98,6 +98,9 @@
|
||||
<member name="debug/export_console_wrapper" type="int" setter="" getter="">
|
||||
If [code]true[/code], a console wrapper executable is exported alongside the main executable, which allows running the project with enabled console output.
|
||||
</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+ and Mobile renderers.
|
||||
</member>
|
||||
<member name="ssh_remote_deploy/cleanup_script" type="String" setter="" getter="">
|
||||
Script code to execute on the remote host when app is finished.
|
||||
The following variables can be used in the script:
|
||||
|
||||
Reference in New Issue
Block a user