From: Rudolf Polzer Date: Wed, 22 Sep 2010 04:23:27 +0000 (+0200) Subject: fix the maths REALLY X-Git-Tag: xonotic-v0.5.0~221 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5522a08f6c852d14272b243e45270054ef5782eb;p=xonotic%2Fnetradiant.git fix the maths REALLY --- diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 81c04df1..3587c47e 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -1834,7 +1834,7 @@ static void SubsampleRawLuxel_r( rawLightmap_t *lm, trace_t *trace, vec3_t sampl { if( cluster[ b ] < 0 ) continue; - SubsampleRawLuxel_r( lm, trace, origin[ b ], x, y, (bias / 3.0f), luxel[ b ] ); + SubsampleRawLuxel_r( lm, trace, origin[ b ], x, y, (bias * 0.5f), luxel[ b ] ); } } @@ -2203,7 +2203,7 @@ void IlluminateRawLightmap( int rawLightmapNum ) //% continue; /* subsample it */ - SubsampleRawLuxel_r( lm, &trace, origin, sx, sy, 1.0f/3.0f, lightLuxel ); + SubsampleRawLuxel_r( lm, &trace, origin, sx, sy, 0.25f, lightLuxel ); /* will do: first -1/3 .. +1/3, then subsample these corners the same way -> -1/9 .. +1/9 around them, etc. -> 1/3 + 1/9 + 1/27 + ... = 0.5 */ /* debug code to colorize subsampled areas to yellow */