wined3d: Clamp the light exponent at 128.

This commit is contained in:
Christoph Frick 2006-09-17 19:54:33 +02:00 committed by Alexandre Julliard
parent d51594d0d6
commit 6192f77d25
1 changed files with 3 additions and 0 deletions

View File

@ -2755,6 +2755,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLight(IWineD3DDevice *iface, DWORD I
}
if (rho < 0.0001) rho = 0.0001f;
object->exponent = -0.3/log(cos(rho/2));
if (object->exponent > 128.0) {
object->exponent = 128.0;
}
object->cutoff = pLight->Phi*90/M_PI;
/* FIXME: Range */