SwRasterizer: Corrected the light LUT lookups.

This commit is contained in:
Subv 2017-06-09 17:33:25 -05:00 committed by wwylele
parent 80b6fc592e
commit f2d4d5c219
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>