From 2cf7af9149e3558b8cfb30e03e660795f32fa61a Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 19 Oct 2025 00:19:40 +0200 Subject: [PATCH] Make all unsupported renderer message features consistently warnings Previously, some messages indicating a lack of support were errors instead of warnings. Some messages were also not shown when running a release export template. - Use "renderer" terminology consistently instead of "rendering method". --- drivers/gles3/storage/material_storage.cpp | 4 +-- editor/editor_node.cpp | 10 +++---- editor/project_manager/project_dialog.cpp | 2 +- editor/scene/3d/node_3d_editor_plugin.cpp | 4 +-- main/main.cpp | 2 +- scene/2d/gpu_particles_2d.cpp | 2 +- scene/3d/decal.cpp | 2 +- scene/3d/gpu_particles_3d.cpp | 4 +-- scene/3d/visual_instance_3d.cpp | 4 +-- servers/rendering/renderer_viewport.cpp | 30 ++++++++++++++----- .../storage/camera_attributes_storage.cpp | 4 +-- .../rendering/storage/environment_storage.cpp | 10 +++---- 12 files changed, 47 insertions(+), 31 deletions(-) diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index f347b488b21..f60c30ce761 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -3109,7 +3109,7 @@ void SceneShaderData::set_code(const String &p_code) { #ifdef DEBUG_ENABLED if (uses_particle_trails) { - WARN_PRINT_ONCE_ED("Particle trails are only available when using the Forward+ or Mobile renderers."); + WARN_PRINT_ONCE_ED("Particle trails are only available when using the Forward+ or Mobile renderer."); } if (uses_sss) { @@ -3121,7 +3121,7 @@ void SceneShaderData::set_code(const String &p_code) { } if (uses_normal_texture) { - WARN_PRINT_ONCE_ED("Reading from the normal-roughness texture is only available when using the Forward+ or Mobile renderers."); + WARN_PRINT_ONCE_ED("Reading from the normal-roughness texture is only available when using the Forward+ or Mobile renderer."); } #endif diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index fa4f6bffa28..d7ce04d8352 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -7535,7 +7535,7 @@ void EditorNode::_renderer_selected(int p_index) { const String web_rendering_method = "gl_compatibility"; video_restart_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_set_renderer_name_save_and_restart).bind(rendering_method)); video_restart_dialog->set_text( - vformat(TTR("Changing the renderer requires restarting the editor.\n\nChoosing Save & Restart will change the rendering method to:\n- Desktop platforms: %s\n- Mobile platforms: %s\n- Web platform: %s"), + vformat(TTR("Changing the renderer requires restarting the editor.\n\nChoosing Save & Restart will change the renderer to:\n- Desktop platforms: %s\n- Mobile platforms: %s\n- Web platform: %s"), _to_rendering_method_display_name(rendering_method), _to_rendering_method_display_name(mobile_rendering_method), _to_rendering_method_display_name(web_rendering_method))); video_restart_dialog->popup_centered(); @@ -7559,11 +7559,11 @@ void EditorNode::_set_renderer_name_save_and_restart(const String &p_rendering_m ProjectSettings::get_singleton()->set("rendering/renderer/rendering_method", p_rendering_method); if (p_rendering_method == "mobile" || p_rendering_method == "gl_compatibility") { - // Also change the mobile override if changing to a compatible rendering method. + // Also change the mobile override if changing to a compatible renderer. // This prevents visual discrepancies between desktop and mobile platforms. ProjectSettings::get_singleton()->set("rendering/renderer/rendering_method.mobile", p_rendering_method); } else if (p_rendering_method == "forward_plus") { - // Use the equivalent mobile rendering method. This prevents the rendering method from staying + // Use the equivalent mobile renderer. This prevents the renderer from staying // on its old choice if moving from `gl_compatibility` to `forward_plus`. ProjectSettings::get_singleton()->set("rendering/renderer/rendering_method.mobile", "mobile"); } @@ -8695,8 +8695,8 @@ EditorNode::EditorNode() { renderer->set_focus_mode(Control::FOCUS_ACCESSIBILITY); renderer->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); renderer->set_tooltip_auto_translate_mode(AUTO_TRANSLATE_MODE_ALWAYS); - renderer->set_tooltip_text(TTRC("Choose a rendering method.\n\nNotes:\n- On mobile platforms, the Mobile rendering method is used if Forward+ is selected here.\n- On the web platform, the Compatibility rendering method is always used.")); - renderer->set_accessibility_name(TTRC("Rendering Method")); + renderer->set_tooltip_text(TTRC("Choose a renderer.\n\nNotes:\n- On mobile platforms, the Mobile renderer is used if Forward+ is selected here.\n- On the web platform, the Compatibility renderer is always used.")); + renderer->set_accessibility_name(TTRC("Renderer")); right_menu_hb->add_child(renderer); diff --git a/editor/project_manager/project_dialog.cpp b/editor/project_manager/project_dialog.cpp index d0a384e279e..f47a02762fc 100644 --- a/editor/project_manager/project_dialog.cpp +++ b/editor/project_manager/project_dialog.cpp @@ -566,7 +566,7 @@ void ProjectDialog::ok_pressed() { project_features.push_back("Mobile"); } else if (renderer_type == "gl_compatibility") { project_features.push_back("GL Compatibility"); - // Also change the default rendering method for the mobile override. + // Also change the default renderer for the mobile override. initial_settings["rendering/renderer/rendering_method.mobile"] = "gl_compatibility"; } else { WARN_PRINT("Unknown renderer type. Please report this as a bug on GitHub."); diff --git a/editor/scene/3d/node_3d_editor_plugin.cpp b/editor/scene/3d/node_3d_editor_plugin.cpp index bd31d8dd846..4e2d17bec98 100644 --- a/editor/scene/3d/node_3d_editor_plugin.cpp +++ b/editor/scene/3d/node_3d_editor_plugin.cpp @@ -3239,11 +3239,11 @@ void Node3DEditorViewport::_notification(int p_what) { break; case SupportedRenderingMethods::FORWARD_PLUS_MOBILE: disabled = OS::get_singleton()->get_current_rendering_method() == "gl_compatibility"; - disabled_tooltip = TTR("This debug draw mode is not supported when using the Compatibility rendering method."); + disabled_tooltip = TTR("This debug draw mode is only supported when using the Forward+ or Mobile renderer."); break; case SupportedRenderingMethods::FORWARD_PLUS: disabled = OS::get_singleton()->get_current_rendering_method() == "gl_compatibility" || OS::get_singleton()->get_current_rendering_method() == "mobile"; - disabled_tooltip = TTR("This debug draw mode is not supported when using the Mobile or Compatibility rendering methods."); + disabled_tooltip = TTR("This debug draw mode is only supported when using the Forward+ renderer."); break; } diff --git a/main/main.cpp b/main/main.cpp index 4053afa5c83..6dcbc8fd30e 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -547,7 +547,7 @@ void Main::print_help(const char *p_binary) { print_help_option("--version", "Display the version string.\n"); print_help_option("-v, --verbose", "Use verbose stdout mode.\n"); print_help_option("--quiet", "Quiet mode, silences stdout messages. Errors are still displayed.\n"); - print_help_option("--no-header", "Do not print engine version and rendering method header on startup.\n"); + print_help_option("--no-header", "Do not print engine version and rendering driver/method header on startup.\n"); print_help_title("Run options"); print_help_option("--, ++", "Separator for user-provided arguments. Following arguments are not used by the engine, but can be read from `OS.get_cmdline_user_args()`.\n"); diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp index adc095c1f04..924cfd2acac 100644 --- a/scene/2d/gpu_particles_2d.cpp +++ b/scene/2d/gpu_particles_2d.cpp @@ -389,7 +389,7 @@ PackedStringArray GPUParticles2D::get_configuration_warnings() const { } if (trail_enabled && (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility" || OS::get_singleton()->get_current_rendering_method() == "dummy")) { - warnings.push_back(RTR("Particle trails are only available when using the Forward+ or Mobile renderers.")); + warnings.push_back(RTR("Particle trails are only available when using the Forward+ or Mobile renderer.")); } if (sub_emitter != NodePath() && (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility" || OS::get_singleton()->get_current_rendering_method() == "dummy")) { diff --git a/scene/3d/decal.cpp b/scene/3d/decal.cpp index 9931bc59bfb..169db4a9575 100644 --- a/scene/3d/decal.cpp +++ b/scene/3d/decal.cpp @@ -170,7 +170,7 @@ PackedStringArray Decal::get_configuration_warnings() const { PackedStringArray warnings = VisualInstance3D::get_configuration_warnings(); if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility" || OS::get_singleton()->get_current_rendering_method() == "dummy") { - warnings.push_back(RTR("Decals are only available when using the Forward+ or Mobile renderers.")); + warnings.push_back(RTR("Decals are only available when using the Forward+ or Mobile renderer.")); return warnings; } diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp index 81de5180b1a..96afd066353 100644 --- a/scene/3d/gpu_particles_3d.cpp +++ b/scene/3d/gpu_particles_3d.cpp @@ -423,12 +423,12 @@ PackedStringArray GPUParticles3D::get_configuration_warnings() const { warnings.push_back(RTR("Trails enabled, but one or more mesh materials are either missing or not set for trails rendering.")); } if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility" || OS::get_singleton()->get_current_rendering_method() == "dummy") { - warnings.push_back(RTR("Particle trails are only available when using the Forward+ or Mobile renderers.")); + warnings.push_back(RTR("Particle trails are only available when using the Forward+ or Mobile renderer.")); } } if (sub_emitter != NodePath() && (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility" || OS::get_singleton()->get_current_rendering_method() == "dummy")) { - warnings.push_back(RTR("Particle sub-emitters are only available when using the Forward+ or Mobile renderers.")); + warnings.push_back(RTR("Particle sub-emitters are only available when using the Forward+ or Mobile renderer.")); } return warnings; diff --git a/scene/3d/visual_instance_3d.cpp b/scene/3d/visual_instance_3d.cpp index 83cf91f9aab..a315c179e82 100644 --- a/scene/3d/visual_instance_3d.cpp +++ b/scene/3d/visual_instance_3d.cpp @@ -522,11 +522,11 @@ PackedStringArray GeometryInstance3D::get_configuration_warnings() const { } if (!Math::is_zero_approx(transparency) && OS::get_singleton()->get_current_rendering_method() != "forward_plus") { - warnings.push_back(RTR("GeometryInstance3D transparency is only available when using the Forward+ rendering method.")); + warnings.push_back(RTR("GeometryInstance3D transparency is only available when using the Forward+ renderer.")); } if ((visibility_range_fade_mode == VISIBILITY_RANGE_FADE_SELF || visibility_range_fade_mode == VISIBILITY_RANGE_FADE_DEPENDENCIES) && OS::get_singleton()->get_current_rendering_method() != "forward_plus") { - warnings.push_back(RTR("GeometryInstance3D visibility range transparency fade is only available when using the Forward+ rendering method.")); + warnings.push_back(RTR("GeometryInstance3D visibility range transparency fade is only available when using the Forward+ renderer.")); } return warnings; diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp index c622decaa65..b965ec6181a 100644 --- a/servers/rendering/renderer_viewport.cpp +++ b/servers/rendering/renderer_viewport.cpp @@ -987,15 +987,23 @@ void RendererViewport::viewport_set_use_xr(RID p_viewport, bool p_use_xr) { void RendererViewport::viewport_set_scaling_3d_mode(RID p_viewport, RS::ViewportScaling3DMode p_mode) { Viewport *viewport = viewport_owner.get_or_null(p_viewport); ERR_FAIL_NULL(viewport); +#ifdef DEBUG_ENABLED const String rendering_method = OS::get_singleton()->get_current_rendering_method(); if (rendering_method != "forward_plus") { - ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_FSR, "FSR1 is only available when using the Forward+ renderer."); - ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_FSR2, "FSR2 is only available when using the Forward+ renderer."); - ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL, "MetalFX Temporal is only available when using the Forward+ renderer."); + if (p_mode == RS::VIEWPORT_SCALING_3D_MODE_FSR) { + WARN_PRINT_ONCE_ED("FSR1 3D scaling is only available when using the Forward+ renderer."); + } + if (p_mode == RS::VIEWPORT_SCALING_3D_MODE_FSR2) { + WARN_PRINT_ONCE_ED("FSR2 3D scaling is only available when using the Forward+ renderer."); + } + if (p_mode == RS::VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL) { + WARN_PRINT_ONCE_ED("MetalFX Temporal 3D scaling is only available when using the Forward+ renderer."); + } } - if (rendering_method == "gl_compatibility") { - ERR_FAIL_COND_EDMSG(p_mode == RS::VIEWPORT_SCALING_3D_MODE_METALFX_SPATIAL, "MetalFX Spatial is only available when using the Forward+ and Mobile renderers."); + if (rendering_method == "gl_compatibility" && p_mode == RS::VIEWPORT_SCALING_3D_MODE_METALFX_SPATIAL) { + WARN_PRINT_ONCE_ED("MetalFX Spatial 3D scaling is only available when using the Forward+ or Mobile renderer."); } +#endif if (viewport->scaling_3d_mode == p_mode) { return; @@ -1387,7 +1395,11 @@ bool RendererViewport::viewport_is_using_hdr_2d(RID p_viewport) const { void RendererViewport::viewport_set_screen_space_aa(RID p_viewport, RS::ViewportScreenSpaceAA p_mode) { Viewport *viewport = viewport_owner.get_or_null(p_viewport); ERR_FAIL_NULL(viewport); - ERR_FAIL_COND_EDMSG(p_mode != RS::VIEWPORT_SCREEN_SPACE_AA_DISABLED && OS::get_singleton()->get_current_rendering_method() == "gl_compatibility", "Screen space AA is currently unavailable on the Compatibility renderer."); +#ifdef DEBUG_ENABLED + if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility" && p_mode != RS::VIEWPORT_SCREEN_SPACE_AA_DISABLED) { + WARN_PRINT_ONCE_ED("Screen-space AA is only available when using the Forward+ or Mobile renderer."); + } +#endif if (viewport->screen_space_aa == p_mode) { return; @@ -1399,7 +1411,11 @@ void RendererViewport::viewport_set_screen_space_aa(RID p_viewport, RS::Viewport void RendererViewport::viewport_set_use_taa(RID p_viewport, bool p_use_taa) { Viewport *viewport = viewport_owner.get_or_null(p_viewport); ERR_FAIL_NULL(viewport); - ERR_FAIL_COND_EDMSG(OS::get_singleton()->get_current_rendering_method() != "forward_plus", "TAA is only available when using the Forward+ renderer."); +#ifdef DEBUG_ENABLED + if (OS::get_singleton()->get_current_rendering_method() != "forward_plus") { + WARN_PRINT_ONCE_ED("TAA is only available when using the Forward+ renderer."); + } +#endif if (viewport->use_taa == p_use_taa) { return; diff --git a/servers/rendering/storage/camera_attributes_storage.cpp b/servers/rendering/storage/camera_attributes_storage.cpp index 3e33954f19a..51921b0ad8d 100644 --- a/servers/rendering/storage/camera_attributes_storage.cpp +++ b/servers/rendering/storage/camera_attributes_storage.cpp @@ -67,7 +67,7 @@ void RendererCameraAttributes::camera_attributes_set_dof_blur(RID p_camera_attri ERR_FAIL_NULL(cam_attributes); #ifdef DEBUG_ENABLED if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility" && (p_far_enable || p_near_enable)) { - WARN_PRINT_ONCE_ED("DoF blur is only available when using the Forward+ or Mobile renderers."); + WARN_PRINT_ONCE_ED("Depth of field blur is only available when using the Forward+ or Mobile renderer."); } #endif cam_attributes->dof_blur_far_enabled = p_far_enable; @@ -145,7 +145,7 @@ void RendererCameraAttributes::camera_attributes_set_auto_exposure(RID p_camera_ } #ifdef DEBUG_ENABLED if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility" && p_enable) { - WARN_PRINT_ONCE_ED("Auto exposure is only available when using the Forward+ or Mobile renderers."); + WARN_PRINT_ONCE_ED("Auto-exposure is only available when using the Forward+ or Mobile renderer."); } #endif cam_attributes->use_auto_exposure = p_enable; diff --git a/servers/rendering/storage/environment_storage.cpp b/servers/rendering/storage/environment_storage.cpp index 2d0007de404..5c57b412ba7 100644 --- a/servers/rendering/storage/environment_storage.cpp +++ b/servers/rendering/storage/environment_storage.cpp @@ -347,7 +347,7 @@ void RendererEnvironmentStorage::environment_set_volumetric_fog(RID p_env, bool ERR_FAIL_NULL(env); #ifdef DEBUG_ENABLED if (OS::get_singleton()->get_current_rendering_method() != "forward_plus" && p_enable) { - WARN_PRINT_ONCE_ED("Volumetric fog can only be enabled when using the Forward+ renderer."); + WARN_PRINT_ONCE_ED("Volumetric fog is only available when using the Forward+ renderer."); } #endif env->volumetric_fog_enabled = p_enable; @@ -542,7 +542,7 @@ void RendererEnvironmentStorage::environment_set_ssr(RID p_env, bool p_enable, i ERR_FAIL_NULL(env); #ifdef DEBUG_ENABLED if (OS::get_singleton()->get_current_rendering_method() != "forward_plus" && p_enable) { - WARN_PRINT_ONCE_ED("Screen-space reflections (SSR) can only be enabled when using the Forward+ renderer."); + WARN_PRINT_ONCE_ED("Screen-space reflections (SSR) are only available when using the Forward+ renderer."); } #endif env->ssr_enabled = p_enable; @@ -589,7 +589,7 @@ void RendererEnvironmentStorage::environment_set_ssao(RID p_env, bool p_enable, ERR_FAIL_NULL(env); #ifdef DEBUG_ENABLED if (OS::get_singleton()->get_current_rendering_method() == "mobile" && p_enable) { - WARN_PRINT_ONCE_ED("Screen-space ambient occlusion (SSAO) can only be enabled when using the Forward+ or Compatibility renderers."); + WARN_PRINT_ONCE_ED("Screen-space ambient occlusion (SSAO) is only available when using the Forward+ or Compatibility renderers."); } #endif env->ssao_enabled = p_enable; @@ -664,7 +664,7 @@ void RendererEnvironmentStorage::environment_set_ssil(RID p_env, bool p_enable, ERR_FAIL_NULL(env); #ifdef DEBUG_ENABLED if (OS::get_singleton()->get_current_rendering_method() != "forward_plus" && p_enable) { - WARN_PRINT_ONCE_ED("Screen-space indirect lighting (SSIL) can only be enabled when using the Forward+ renderer."); + WARN_PRINT_ONCE_ED("Screen-space indirect lighting (SSIL) is only available when using the Forward+ renderer."); } #endif env->ssil_enabled = p_enable; @@ -711,7 +711,7 @@ void RendererEnvironmentStorage::environment_set_sdfgi(RID p_env, bool p_enable, ERR_FAIL_NULL(env); #ifdef DEBUG_ENABLED if (OS::get_singleton()->get_current_rendering_method() != "forward_plus" && p_enable) { - WARN_PRINT_ONCE_ED("SDFGI can only be enabled when using the Forward+ renderer."); + WARN_PRINT_ONCE_ED("SDFGI is only available when using the Forward+ renderer."); } #endif env->sdfgi_enabled = p_enable;