]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
force going all the way down when subsampling grates
authorRudolf Polzer <divverent@alientrap.org>
Wed, 22 Sep 2010 06:26:54 +0000 (08:26 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 22 Sep 2010 06:26:54 +0000 (08:26 +0200)
tools/quake3/q3map2/light.c
tools/quake3/q3map2/light_trace.c
tools/quake3/q3map2/light_ydnar.c

index b07314c03e310d9422e19bf29f86660b36028dbb..882c7b65a9cff489d9cbfe8aadc70aa3c6a95919 100644 (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 );
index 73e69b0326291cc6570a03bb9e812bb98cb870ed..5194962f1ba64655b84c002cf8761074cf28b28c 100644 (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 );
index ccbc54adb88e695f7bb75760ab93a000b81e44bb..c1bab3df5e85316a9644aaebc13cfaf548180c56 100644 (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 ] );