Merge pull request #47876 from fire/gltf-export-fixes

Export gltf2 normal textures correctly.
This commit is contained in:
Rémi Verschelde 2021-04-14 09:08:54 +02:00 committed by GitHub
commit 33333f1681
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);