Fix black screen issue in SW T&L

This commit is contained in:
raven02 2013-03-22 20:54:46 +08:00
parent 610de43719
commit 3f0d8cba83

View File

@ -287,6 +287,8 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[
float distanceToLight = toLight.Length();
float dot = 0.0f;
Vec3 norm(0,0,0);
if (distanceToLight > 0.0f)
{
toLight /= distanceToLight;