Browse Source

Fixed TBN Matrix bug.

angel 7 years ago
parent
commit
0b9901e281
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/matrix.cpp

+ 3 - 0
src/matrix.cpp

@@ -401,6 +401,9 @@ Matrix4 Matrix4::TBNMatrix(const Vector3f &tangent, const Vector3f &biTangent, c
     tangentMat(2,1) = biTangent.z;
     tangentMat(2,2) = normal.z;
 
+    //fourth row
+    tangentMat(3,3) = 1.0;
+
     return tangentMat.transpose();
 
 }