1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fix BasisUniversal ETC RA_AS_RG transcoding

(cherry picked from commit 51ad937532)
This commit is contained in:
BlueCube3310
2024-01-07 12:53:01 +01:00
committed by Yuri Sizov
parent b915d7d9f2
commit bf2b98b801

View File

@@ -221,7 +221,7 @@ static Ref<Image> basis_universal_unpacker_ptr(const uint8_t *p_data, int p_size
imgfmt = Image::FORMAT_DXT5_RA_AS_RG; imgfmt = Image::FORMAT_DXT5_RA_AS_RG;
} else if (RS::get_singleton()->has_os_feature("etc2")) { } else if (RS::get_singleton()->has_os_feature("etc2")) {
format = basist::transcoder_texture_format::cTFETC2; // get this from renderer format = basist::transcoder_texture_format::cTFETC2; // get this from renderer
imgfmt = Image::FORMAT_ETC2_RGBA8; imgfmt = Image::FORMAT_ETC2_RA_AS_RG;
} else { } else {
//opengl most likely, bad for normal maps, nothing to do about this. //opengl most likely, bad for normal maps, nothing to do about this.
format = basist::transcoder_texture_format::cTFRGBA32; format = basist::transcoder_texture_format::cTFRGBA32;