From 6192f77d25209d266c0302db74bfaadc35494366 Mon Sep 17 00:00:00 2001 From: Christoph Frick Date: Sun, 17 Sep 2006 19:54:33 +0200 Subject: [PATCH] wined3d: Clamp the light exponent at 128. --- dlls/wined3d/device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 34026db5e2b..e32b8245973 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -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 */