force going all the way down when subsampling grates

This commit is contained in:
Rudolf Polzer 2010-09-22 08:26:54 +02:00
parent fd6d38c979
commit d14718daef
3 changed files with 8 additions and 1 deletions

View File

@ -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 );

View File

@ -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 );

View File

@ -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 ] );