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