summaryrefslogtreecommitdiff
path: root/modules/gltf/gltf_document.cpp
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2021-04-13 12:12:08 -0700
committerK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2021-04-13 13:28:26 -0700
commit3cae9a802bd7d40864be21d36c48d9ee020444d0 (patch)
tree5666031220ceb6b25f6a437ffec71167854a40df /modules/gltf/gltf_document.cpp
parenta86e7c3bb7d9238e664be8a7c63d1cc19bde0d8c (diff)
Export gltf2 normal textures correctly.
Diffstat (limited to 'modules/gltf/gltf_document.cpp')
-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);