Export gltf2 normal textures correctly.

This commit is contained in:
K. S. Ernest (iFire) Lee 2021-04-13 12:12:08 -07:00
parent a86e7c3bb7
commit 3cae9a802b
1 changed files with 1 additions and 0 deletions

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