@@ -14,9 +14,9 @@ void Camera::update(){
float radius = 2;
float camX = std::sin(t/6000) * radius;
float camZ = std::cos(t/6000) * radius;
- position.x = camX;
+ position.x = 0;
position.y = 0;
- position.z = camZ;
+ position.z = 2;
target.z = 0;
viewMatrix = Matrix4::lookAt(position,target,up);
cameraFrustrum.updatePlanes(viewMatrix, position);
@@ -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();
}