From 3cae9a802bd7d40864be21d36c48d9ee020444d0 Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Tue, 13 Apr 2021 12:12:08 -0700 Subject: Export gltf2 normal textures correctly. --- modules/gltf/gltf_document.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'modules') diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 0b70175a24..c7a2779655 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -3293,6 +3293,7 @@ Error GLTFDocument::_serialize_materials(Ref state) { } img->decompress(); img->convert(Image::FORMAT_RGBA8); + img->convert_ra_rgba8_to_rg(); for (int32_t y = 0; y < img->get_height(); y++) { for (int32_t x = 0; x < img->get_width(); x++) { Color c = img->get_pixel(x, y); -- cgit v1.2.3