Browse Source

Merge pull request #48363 from aaronfranke/tan

Fix some tangent Color typos in GLTF
Rémi Verschelde 4 years ago
parent
commit
8abd50359b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      modules/gltf/gltf_document.cpp

+ 3 - 3
modules/gltf/gltf_document.cpp

@@ -2389,9 +2389,9 @@ Error GLTFDocument::_serialize_meshes(Ref<GLTFState> state) {
 						for (int i = 0; i < ret_size; i++) {
 							Color tangent;
 							tangent.r = tarr[(i * 4) + 0];
-							tangent.r = tarr[(i * 4) + 1];
-							tangent.r = tarr[(i * 4) + 2];
-							tangent.r = tarr[(i * 4) + 3];
+							tangent.g = tarr[(i * 4) + 1];
+							tangent.b = tarr[(i * 4) + 2];
+							tangent.a = tarr[(i * 4) + 3];
 						}
 						t["TANGENT"] = _encode_accessor_as_color(state, attribs, true);
 					}