SwRasterizer: Corrected the light LUT lookups.

This commit is contained in:
Subv 2017-06-09 17:33:25 -05:00 committed by wwylele
parent e50af9c6a1
commit 9bc4d2754b
2 changed files with 48 additions and 33 deletions

View file

@ -30,6 +30,11 @@ public:
return {xyz * other.w + other.xyz * w + Cross(xyz, other.xyz),
w * other.w - Dot(xyz, other.xyz)};
}
Quaternion<T> Normalized() const {
T length = std::sqrt(xyz.Length2() + w * w);
return {xyz / length, w / length};
}
};
template <typename T>