Fixed superfluous up normalization in glm::lookAt() #114

master
Christophe Riccio ago%!(EXTRA string=12 years)
parent ba1ccbaba2
commit 79405910bb
  1. 7
      glm/gtc/matrix_transform.inl

@ -419,10 +419,9 @@ namespace glm
detail::tvec3<T, P> const & up detail::tvec3<T, P> const & up
) )
{ {
detail::tvec3<T, P> f = normalize(center - eye); detail::tvec3<T, P> f(normalize(center - eye));
detail::tvec3<T, P> u = normalize(up); detail::tvec3<T, P> s(normalize(cross(f, up)));
detail::tvec3<T, P> s = normalize(cross(f, u)); detail::tvec3<T, P> u(cross(s, f));
u = cross(s, f);
detail::tmat4x4<T, P> Result(1); detail::tmat4x4<T, P> Result(1);
Result[0][0] = s.x; Result[0][0] = s.x;

Loading…
Cancel
Save