From: Rudolf Polzer Date: Wed, 22 Sep 2010 06:26:54 +0000 (+0200) Subject: force going all the way down when subsampling grates X-Git-Tag: xonotic-v0.5.0~216 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d14718daef9bf346fe29da2b681c35ff86db67ae;p=xonotic%2Fnetradiant.git force going all the way down when subsampling grates --- diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index b07314c0..882c7b65 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -758,6 +758,7 @@ int LightContributionToSample( trace_t *trace ) light = trace->light; /* clear color */ + trace->forceSubsampling = qfalse; /* to make sure */ VectorClear( trace->color ); VectorClear( trace->colorNoShadow ); VectorClear( trace->directionContribution ); diff --git a/tools/quake3/q3map2/light_trace.c b/tools/quake3/q3map2/light_trace.c index 73e69b03..5194962f 100644 --- a/tools/quake3/q3map2/light_trace.c +++ b/tools/quake3/q3map2/light_trace.c @@ -1781,7 +1781,6 @@ sets up certain trace values float SetupTrace( trace_t *trace ) { - trace->forceSubsampling = qfalse; VectorSubtract( trace->end, trace->origin, trace->displacement ); trace->distance = VectorNormalize( trace->displacement, trace->direction ); VectorCopy( trace->origin, trace->hit ); diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index ccbc54ad..c1bab3df 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -1817,6 +1817,13 @@ static void SubsampleRawLuxel_r( rawLightmap_t *lm, trace_t *trace, vec3_t sampl /* sample light */ LightContributionToSample( trace ); + if(trace.forceSubsampling) + { + /* alphashadow: we subsample as deep as we can */ + ++lighted; + ++mapped; + ++mapped; + } /* add to totals (fixme: make contrast function) */ VectorCopy( trace->color, luxel[ b ] );