Christoph Frick : wined3d: Clamp the light exponent at 128.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Sep 20 13:27:00 CDT 2006


Module: wine
Branch: master
Commit: 6192f77d25209d266c0302db74bfaadc35494366
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=6192f77d25209d266c0302db74bfaadc35494366

Author: Christoph Frick <frick at sc-networks.com>
Date:   Sun Sep 17 19:54:33 2006 +0200

wined3d: Clamp the light exponent at 128.

---

 dlls/wined3d/device.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 34026db..e32b824 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2755,6 +2755,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         }
         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 */




More information about the wine-cvs mailing list