Просмотр исходного кода

Export gltf2 normal textures correctly.

K. S. Ernest (iFire) Lee 4 лет назад
Родитель
Сommit
3cae9a802b
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      modules/gltf/gltf_document.cpp

+ 1 - 0
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);