summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-04-14 09:08:54 +0200
committerGitHub <noreply@github.com>2021-04-14 09:08:54 +0200
commit33333f168131a5a328ca8669858ff531349d7667 (patch)
treed0542fc1f254876f63dc70c3351ff62d4d3c867b
parenta0669609e2c282bfb5e2a72fd7bfcc242819fd44 (diff)
parent3cae9a802bd7d40864be21d36c48d9ee020444d0 (diff)
Merge pull request #47876 from fire/gltf-export-fixes
Export gltf2 normal textures correctly.
-rw-r--r--modules/gltf/gltf_document.cpp1
1 files changed, 1 insertions, 0 deletions
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<GLTFState> 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);