From 42d241347b143c1cab5a7cf02f42ab4cfa968789 Mon Sep 17 00:00:00 2001 From: rpolzer Date: Tue, 30 Sep 2008 13:07:10 +0000 Subject: [PATCH] fix two deluxemap bugs git-svn-id: svn://svn.icculus.org/netradiant/trunk@110 61c419a2-8eb2-4b30-bcec-8cead039b335 --- tools/quake3/q3map2/light_ydnar.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index a206a03..e11f340 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -2007,7 +2007,11 @@ void IlluminateRawLightmap( int rawLightmapNum ) { VectorCopy( ambientColor, luxel ); if( deluxemap ) - VectorScale( normal, 0.00390625f, deluxel ); + { + brightness = ambientColor[ 0 ] * 0.3f + ambientColor[ 1 ] * 0.59f + ambientColor[ 2 ] * 0.11f; + brightness *= (1.0 / 255.0); + VectorScale( normal, brightness, deluxel ); + } luxel[ 3 ] = 1.0f; } } @@ -2374,6 +2378,11 @@ void IlluminateRawLightmap( int rawLightmapNum ) luxel[2]+=flood[2]; if (luxel[3]==0) luxel[3]=1; + + brightness = flood[ 0 ] * 0.3f + flood[ 1 ] * 0.59f + flood[ 2 ] * 0.11f; + brightness *= (1.0 / 255.0); + VectorScale( normal, brightness, temp ); + VectorAdd( deluxel, temp, deluxel ); } } } -- 2.39.2