Merge pull request #106085 from clayjohn/texture-decompress-import

Fix loading BPTC/ASTC textures on devices that don't support them
This commit is contained in:
Thaddeus Crews 2025-05-06 08:38:04 -05:00
commit 7efe897343
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -121,6 +121,12 @@ Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndTy
}
}
if (p_load && !path_found && decomp_path_found) {
print_verbose(vformat("No natively supported texture format found for %s, using decompressable format %s.", p_path, decomp_path));
r_path_and_type.path = decomp_path;
return OK;
}
#ifdef TOOLS_ENABLED
if (r_path_and_type.metadata && !r_path_and_type.path.is_empty()) {
Dictionary meta = r_path_and_type.metadata;