You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user