Skip to content

Commit

Permalink
Export gltf2 normal textures correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Apr 13, 2021
1 parent a86e7c3 commit 3cae9a8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/gltf/gltf_document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3cae9a8

Please sign in to comment.