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".
This commit is contained in:
Hugo Locurcio 2025-10-19 00:19:40 +02:00
parent f5918a9d35
commit 2cf7af9149
No known key found for this signature in database
GPG key ID: 46ACE49F61685096
12 changed files with 47 additions and 31 deletions

View file

@ -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

View file

@ -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);

View file

@ -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.");

View file

@ -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;
}

View file

@ -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");

View file

@ -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")) {

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;