Skip to content

Commit

Permalink
Merge pull request #98747 from tetrapod00/standardize-renderer-strings
Browse files Browse the repository at this point in the history
Standardize terms for renderers in error strings
  • Loading branch information
Repiteo committed Dec 13, 2024
2 parents b68675e + 899f515 commit 9ecdeb3
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion drivers/gles3/rasterizer_canvas_gles3.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class RasterizerCanvasGLES3 : public RendererCanvasRender {

virtual void set_debug_redraw(bool p_enabled, double p_time, const Color &p_color) override {
if (p_enabled) {
WARN_PRINT_ONCE("Debug CanvasItem Redraw is not available yet when using the GL Compatibility backend.");
WARN_PRINT_ONCE("Debug CanvasItem Redraw is not available yet when using the Compatibility renderer.");
}
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gles3/rasterizer_scene_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2129,7 +2129,7 @@ void RasterizerSceneGLES3::_render_shadow_pass(RID p_light, RID p_shadow_atlas,
light_transform = light_storage->light_instance_get_shadow_transform(p_light, p_pass);
shadow_size = shadow_size / 2;
} else {
ERR_FAIL_MSG("Dual paraboloid shadow mode not supported in GL Compatibility renderer. Please use Cubemap shadow mode instead.");
ERR_FAIL_MSG("Dual paraboloid shadow mode not supported in the Compatibility renderer. Please use CubeMap shadow mode instead.");
}

shadow_bias = light_storage->light_get_param(base, RS::LIGHT_PARAM_SHADOW_BIAS);
Expand Down
10 changes: 5 additions & 5 deletions drivers/gles3/storage/material_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ void MaterialData::update_textures(const HashMap<StringName, Variant> &p_paramet
}
} break;
case ShaderLanguage::TYPE_SAMPLERCUBEARRAY: {
ERR_PRINT_ONCE("Type: SamplerCubeArray not supported in GL Compatibility rendering backend, please use another type.");
ERR_PRINT_ONCE("Type: SamplerCubeArray is not supported in the Compatibility renderer, please use another type.");
} break;
case ShaderLanguage::TYPE_SAMPLEREXT: {
gl_texture = texture_storage->texture_gl_get_default(DEFAULT_GL_TEXTURE_EXT);
Expand Down Expand Up @@ -3013,19 +3013,19 @@ 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 rendering backends.");
WARN_PRINT_ONCE_ED("Particle trails are only available when using the Forward+ or Mobile renderers.");
}

if (uses_sss) {
WARN_PRINT_ONCE_ED("Sub-surface scattering is only available when using the Forward+ rendering backend.");
WARN_PRINT_ONCE_ED("Subsurface scattering is only available when using the Forward+ renderer.");
}

if (uses_transmittance) {
WARN_PRINT_ONCE_ED("Transmittance is only available when using the Forward+ rendering backend.");
WARN_PRINT_ONCE_ED("Transmittance is only available when using the Forward+ renderer.");
}

if (uses_normal_texture) {
WARN_PRINT_ONCE_ED("Reading from the normal-roughness texture is only available when using the Forward+ or Mobile rendering backends.");
WARN_PRINT_ONCE_ED("Reading from the normal-roughness texture is only available when using the Forward+ or Mobile renderers.");
}
#endif

Expand Down
14 changes: 7 additions & 7 deletions drivers/gles3/storage/particles_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,13 @@ void ParticlesStorage::particles_set_fractional_delta(RID p_particles, bool p_en

void ParticlesStorage::particles_set_trails(RID p_particles, bool p_enable, double p_length) {
if (p_enable) {
WARN_PRINT_ONCE_ED("The GL Compatibility rendering backend does not support particle trails.");
WARN_PRINT_ONCE_ED("The Compatibility renderer does not support particle trails.");
}
}

void ParticlesStorage::particles_set_trail_bind_poses(RID p_particles, const Vector<Transform3D> &p_bind_poses) {
if (p_bind_poses.size() != 0) {
WARN_PRINT_ONCE_ED("The GL Compatibility rendering backend does not support particle trails.");
WARN_PRINT_ONCE_ED("The Compatibility renderer does not support particle trails.");
}
}

Expand Down Expand Up @@ -357,12 +357,12 @@ void ParticlesStorage::particles_restart(RID p_particles) {

void ParticlesStorage::particles_set_subemitter(RID p_particles, RID p_subemitter_particles) {
if (p_subemitter_particles.is_valid()) {
WARN_PRINT_ONCE_ED("The GL Compatibility rendering backend does not support particle sub-emitters.");
WARN_PRINT_ONCE_ED("The Compatibility renderer does not support particle sub-emitters.");
}
}

void ParticlesStorage::particles_emit(RID p_particles, const Transform3D &p_transform, const Vector3 &p_velocity, const Color &p_color, const Color &p_custom, uint32_t p_emit_flags) {
WARN_PRINT_ONCE_ED("The GL Compatibility rendering backend does not support manually emitting particles.");
WARN_PRINT_ONCE_ED("The Compatibility renderer does not support manually emitting particles.");
}

void ParticlesStorage::particles_request_process(RID p_particles) {
Expand Down Expand Up @@ -645,7 +645,7 @@ void ParticlesStorage::_particles_process(Particles *p_particles, double p_delta
attr.extents[2] = extents.z;
} break;
case RS::PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT: {
WARN_PRINT_ONCE_ED("Vector field particle attractors are not available in the GL Compatibility rendering backend.");
WARN_PRINT_ONCE_ED("Vector field particle attractors are not available in the Compatibility renderer.");
} break;
default: {
}
Expand Down Expand Up @@ -678,7 +678,7 @@ void ParticlesStorage::_particles_process(Particles *p_particles, double p_delta
col.extents[2] = extents.z;
} break;
case RS::PARTICLES_COLLISION_TYPE_SDF_COLLIDE: {
WARN_PRINT_ONCE_ED("SDF Particle Colliders are not available in the GL Compatibility rendering backend.");
WARN_PRINT_ONCE_ED("SDF Particle Colliders are not available in the Compatibility renderer.");
} break;
case RS::PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE: {
if (collision_heightmap_texture != 0) { //already taken
Expand Down Expand Up @@ -1341,7 +1341,7 @@ void ParticlesStorage::particles_collision_set_attractor_attenuation(RID p_parti
}

void ParticlesStorage::particles_collision_set_field_texture(RID p_particles_collision, RID p_texture) {
WARN_PRINT_ONCE_ED("The GL Compatibility rendering backend does not support SDF collisions in 3D particle shaders");
WARN_PRINT_ONCE_ED("The Compatibility renderer does not support SDF collisions in 3D particle shaders");
}

void ParticlesStorage::particles_collision_height_field_update(RID p_particles_collision) {
Expand Down
6 changes: 3 additions & 3 deletions drivers/gles3/storage/texture_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ Ref<Image> TextureStorage::_get_gl_image_and_format(const Ref<Image> &p_image, I
}
} break;
default: {
ERR_FAIL_V_MSG(Ref<Image>(), "The image format " + itos(p_format) + " is not supported by the GL Compatibility rendering backend.");
ERR_FAIL_V_MSG(Ref<Image>(), vformat("The image format %d is not supported by the Compatibility renderer.", p_format));
}
}

Expand Down Expand Up @@ -841,7 +841,7 @@ void TextureStorage::texture_2d_layered_initialize(RID p_texture, const Vector<R
ERR_FAIL_COND(p_layers.is_empty());

ERR_FAIL_COND(p_layered_type == RS::TEXTURE_LAYERED_CUBEMAP && p_layers.size() != 6);
ERR_FAIL_COND_MSG(p_layered_type == RS::TEXTURE_LAYERED_CUBEMAP_ARRAY, "Cubemap Arrays are not supported in the GL Compatibility backend.");
ERR_FAIL_COND_MSG(p_layered_type == RS::TEXTURE_LAYERED_CUBEMAP_ARRAY, "Cubemap Arrays are not supported in the Compatibility renderer.");

const Ref<Image> &image = p_layers[0];
{
Expand Down Expand Up @@ -1633,7 +1633,7 @@ void TextureStorage::_texture_set_3d_data(RID p_texture, const Vector<Ref<Image>
Ref<Image> img = _get_gl_image_and_format(p_data[0], p_data[0]->get_format(), real_format, format, internal_format, type, compressed, texture->resize_to_po2);
ERR_FAIL_COND(img.is_null());

ERR_FAIL_COND_MSG(compressed, "Compressed 3D textures are not supported in the GL Compatibility backend.");
ERR_FAIL_COND_MSG(compressed, "Compressed 3D textures are not supported in the Compatibility renderer.");

glActiveTexture(GL_TEXTURE0);
glBindTexture(texture->target, texture->tex_id);
Expand Down
2 changes: 1 addition & 1 deletion editor/import/resource_importer_shader_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static String _include_function(const String &p_path, void *userpointer) {

Error ResourceImporterShaderFile::import(ResourceUID::ID p_source_id, const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
/* STEP 1, Read shader code */
ERR_FAIL_COND_V_EDMSG((OS::get_singleton()->get_current_rendering_method() == "gl_compatibility"), ERR_UNAVAILABLE, "Cannot import custom .glsl shaders when using the gl_compatibility rendering_method. Please switch to the forward_plus or mobile rendering methods to use custom shaders.");
ERR_FAIL_COND_V_EDMSG((OS::get_singleton()->get_current_rendering_method() == "gl_compatibility"), ERR_UNAVAILABLE, "Cannot import custom .glsl shaders when using the Compatibility renderer. Please switch to the Forward+ or Mobile renderer to use custom shaders.");
ERR_FAIL_COND_V_EDMSG((DisplayServer::get_singleton()->get_name() == "headless"), ERR_UNAVAILABLE, "Cannot import custom .glsl shaders when running in headless mode.");

Error err;
Expand Down
4 changes: 2 additions & 2 deletions scene/2d/gpu_particles_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,11 @@ PackedStringArray GPUParticles2D::get_configuration_warnings() const {
}

if (trail_enabled && OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
warnings.push_back(RTR("Particle trails are only available when using the Forward+ or Mobile rendering backends."));
warnings.push_back(RTR("Particle trails are only available when using the Forward+ or Mobile renderers."));
}

if (sub_emitter != NodePath() && OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
warnings.push_back(RTR("Particle sub-emitters are not available when using the GL Compatibility rendering backend."));
warnings.push_back(RTR("Particle sub-emitters are not available when using the Compatibility renderer."));
}

return warnings;
Expand Down
2 changes: 1 addition & 1 deletion scene/3d/decal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ PackedStringArray Decal::get_configuration_warnings() const {
PackedStringArray warnings = VisualInstance3D::get_configuration_warnings();

if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
warnings.push_back(RTR("Decals are only available when using the Forward+ or Mobile rendering backends."));
warnings.push_back(RTR("Decals are only available when using the Forward+ or Mobile renderers."));
return warnings;
}

Expand Down
2 changes: 1 addition & 1 deletion scene/3d/fog_volume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ PackedStringArray FogVolume::get_configuration_warnings() const {
Ref<Environment> environment = get_viewport()->find_world_3d()->get_environment();

if (OS::get_singleton()->get_current_rendering_method() != "forward_plus") {
warnings.push_back(RTR("Fog Volumes are only visible when using the Forward+ backend."));
warnings.push_back(RTR("Fog Volumes are only visible when using the Forward+ renderer."));
return warnings;
}

Expand Down
4 changes: 2 additions & 2 deletions scene/3d/gpu_particles_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,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") {
warnings.push_back(RTR("Particle trails are only available when using the Forward+ or Mobile rendering backends."));
warnings.push_back(RTR("Particle trails are only available when using the Forward+ or Mobile renderers."));
}
}

if (sub_emitter != NodePath() && OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
warnings.push_back(RTR("Particle sub-emitters are only available when using the Forward+ or Mobile rendering backends."));
warnings.push_back(RTR("Particle sub-emitters are only available when using the Forward+ or Mobile renderers."));
}

return warnings;
Expand Down
4 changes: 2 additions & 2 deletions scene/3d/light_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ PackedStringArray OmniLight3D::get_configuration_warnings() const {
}

if (get_projector().is_valid() && OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
warnings.push_back(RTR("Projector textures are not supported when using the GL Compatibility backend yet. Support will be added in a future release."));
warnings.push_back(RTR("Projector textures are not supported when using the Compatibility renderer yet. Support will be added in a future release."));
}

return warnings;
Expand Down Expand Up @@ -653,7 +653,7 @@ PackedStringArray SpotLight3D::get_configuration_warnings() const {
}

if (get_projector().is_valid() && OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
warnings.push_back(RTR("Projector textures are not supported when using the GL Compatibility backend yet. Support will be added in a future release."));
warnings.push_back(RTR("Projector textures are not supported when using the Compatibility renderer yet. Support will be added in a future release."));
}

return warnings;
Expand Down
2 changes: 1 addition & 1 deletion scene/3d/voxel_gi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ PackedStringArray VoxelGI::get_configuration_warnings() const {
PackedStringArray warnings = VisualInstance3D::get_configuration_warnings();

if (OS::get_singleton()->get_current_rendering_method() == "gl_compatibility") {
warnings.push_back(RTR("VoxelGI nodes are not supported when using the GL Compatibility backend yet. Support will be added in a future release."));
warnings.push_back(RTR("VoxelGI nodes are not supported when using the Compatibility renderer yet. Support will be added in a future release."));
} else if (probe_data.is_null()) {
warnings.push_back(RTR("No VoxelGI data set, so this node is disabled. Bake static objects to enable GI."));
}
Expand Down
2 changes: 1 addition & 1 deletion scene/resources/particle_process_material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,7 @@ void ParticleProcessMaterial::set_sub_emitter_mode(SubEmitterMode p_sub_emitter_
_queue_shader_change();
notify_property_list_changed();
if (sub_emitter_mode != SUB_EMITTER_DISABLED && RenderingServer::get_singleton()->is_low_end()) {
WARN_PRINT_ONCE_ED("Sub-emitter modes other than SUB_EMITTER_DISABLED are not supported in the GL Compatibility rendering backend.");
WARN_PRINT_ONCE_ED("Sub-emitter modes other than SUB_EMITTER_DISABLED are not supported in the Compatibility renderer.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ void SceneShaderForwardMobile::ShaderData::set_code(const String &p_code) {

#ifdef DEBUG_ENABLED
if (uses_sss) {
WARN_PRINT_ONCE_ED("Sub-surface scattering is only available when using the Forward+ rendering backend.");
WARN_PRINT_ONCE_ED("Subsurface scattering is only available when using the Forward+ renderer.");
}

if (uses_transmittance) {
WARN_PRINT_ONCE_ED("Transmittance is only available when using the Forward+ rendering backend.");
WARN_PRINT_ONCE_ED("Transmittance is only available when using the Forward+ renderer.");
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/rendering_device_binds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Error RDShaderFile::parse_versions_from_text(const String &p_text, const String
ERR_FAIL_NULL_V_MSG(
RenderingDevice::get_singleton(),
ERR_UNAVAILABLE,
"Cannot import custom .glsl shaders when running without a RenderingDevice. This can happen if you are using the headless more or the Compatibility backend.");
"Cannot import custom .glsl shaders when running without a RenderingDevice. This can happen if you are using the headless more or the Compatibility renderer.");

Vector<String> lines = p_text.split("\n");

Expand Down
2 changes: 1 addition & 1 deletion servers/rendering/shader_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9659,7 +9659,7 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f
--texture_uniforms;
--texture_binding;
if (OS::get_singleton()->get_current_rendering_method() != "forward_plus") {
_set_error(RTR("'hint_normal_roughness_texture' is only available when using the Forward+ backend."));
_set_error(RTR("'hint_normal_roughness_texture' is only available when using the Forward+ renderer."));
return ERR_PARSE_ERROR;
}
if (shader_type_identifier != StringName() && String(shader_type_identifier) != "spatial") {
Expand Down
4 changes: 2 additions & 2 deletions servers/rendering/storage/camera_attributes_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 rendering backends.");
WARN_PRINT_ONCE_ED("DoF blur is only available when using the Forward+ or Mobile renderers.");
}
#endif
cam_attributes->dof_blur_far_enabled = p_far_enable;
Expand Down Expand Up @@ -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 rendering backends.");
WARN_PRINT_ONCE_ED("Auto exposure is only available when using the Forward+ or Mobile renderers.");
}
#endif
cam_attributes->use_auto_exposure = p_enable;
Expand Down
10 changes: 5 additions & 5 deletions servers/rendering/storage/environment_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,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+ rendering backend.");
WARN_PRINT_ONCE_ED("Volumetric fog can only be enabled when using the Forward+ renderer.");
}
#endif
env->volumetric_fog_enabled = p_enable;
Expand Down Expand Up @@ -536,7 +536,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+ rendering backend.");
WARN_PRINT_ONCE_ED("Screen-space reflections (SSR) can only be enabled when using the Forward+ renderer.");
}
#endif
env->ssr_enabled = p_enable;
Expand Down Expand Up @@ -583,7 +583,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() != "forward_plus" && p_enable) {
WARN_PRINT_ONCE_ED("Screen-space ambient occlusion (SSAO) can only be enabled when using the Forward+ rendering backend.");
WARN_PRINT_ONCE_ED("Screen-space ambient occlusion (SSAO) can only be enabled when using the Forward+ renderer.");
}
#endif
env->ssao_enabled = p_enable;
Expand Down Expand Up @@ -658,7 +658,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+ rendering backend.");
WARN_PRINT_ONCE_ED("Screen-space indirect lighting (SSIL) can only be enabled when using the Forward+ renderer.");
}
#endif
env->ssil_enabled = p_enable;
Expand Down Expand Up @@ -705,7 +705,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+ rendering backend.");
WARN_PRINT_ONCE_ED("SDFGI can only be enabled when using the Forward+ renderer.");
}
#endif
env->sdfgi_enabled = p_enable;
Expand Down

0 comments on commit 9ecdeb3

Please sign in to comment.