Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Do not warn about unsupported RGB texture formats

BlueCube3310f50f31d99bf5
diff --git a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp
index 6ff8802f948..25445464a6a 100644
--- a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp
+++ b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp
@@ -2889,9 +2889,11 @@ Ref<Image> TextureStorage::_validate_texture_format(const Ref<Image> &p_image, T
}
}
- // RGB formats are often not supported, only print warnings about them when launched with the --verbose flag.
- const bool is_rgb_format = original_format == Image::FORMAT_RGB8 || original_format == Image::FORMAT_RGBH || original_format == Image::FORMAT_RGBF;
- if ((is_print_verbose_enabled() || !is_rgb_format) && original_format != image->get_format()) {
+ // RGB formats are usually not supported, do not print warnings about them.
+ const bool is_rgb_format = original_format == Image::FORMAT_RGB8 || original_format == Image::FORMAT_RGBH || original_format == Image::FORMAT_RGBF ||
+ original_format == Image::FORMAT_RGB16 || original_format == Image::FORMAT_RGB16I;
+
+ if (!is_rgb_format && original_format != image->get_format()) {
WARN_PRINT(vformat("Image format %s not supported by hardware, converting to %s.", Image::get_format_name(original_format), Image::get_format_name(image->get_format())));
}