SW : Treat light type 3 as light type 2

This commit is contained in:
raven02 2013-08-20 11:45:09 +08:00
parent 4e533adf52
commit 1981195c5b

View File

@ -325,6 +325,7 @@ void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[
lightScale = clamp(1.0f / (gstate_c.lightatt[l][0] + gstate_c.lightatt[l][1]*distanceToLight + gstate_c.lightatt[l][2]*distanceToLight*distanceToLight), 0.0f, 1.0f);
break;
case GE_LIGHTTYPE_SPOT:
case GE_LIGHTTYPE_UNKNOWN:
lightDir = gstate_c.lightdir[l];
angle = Dot(toLight.Normalized(), lightDir.Normalized());
if (angle >= gstate_c.lightangle[l])