]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
as patchshadows is broken for grid... turn it off for grid
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 4 Oct 2009 15:33:45 +0000 (15:33 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 4 Oct 2009 15:33:45 +0000 (15:33 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@400 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/light.c

index e1fbeaca5a769ee7941bf34ea860fbb8c2359ff7..218134f96fad6bb16d158cf22b73bb0a4520e6d5 100644 (file)
@@ -1280,7 +1280,6 @@ void TraceGrid( int num )
        contribution_t                  contributions[ MAX_CONTRIBUTIONS ];
        trace_t                                 trace;
        
        contribution_t                  contributions[ MAX_CONTRIBUTIONS ];
        trace_t                                 trace;
        
-       
        /* get grid points */
        gp = &rawGridPoints[ num ];
        bgp = &bspGridPoints[ num ];
        /* get grid points */
        gp = &rawGridPoints[ num ];
        bgp = &bspGridPoints[ num ];
@@ -1628,7 +1627,7 @@ void LightWorld( void )
        vec3_t          color;
        float           f;
        int                     b, bt;
        vec3_t          color;
        float           f;
        int                     b, bt;
-       qboolean        minVertex, minGrid;
+       qboolean        minVertex, minGrid, ps;
        const char      *value;
        
 
        const char      *value;
        
 
@@ -1702,7 +1701,10 @@ void LightWorld( void )
                SetupEnvelopes( qtrue, fastgrid );
                
                Sys_Printf( "--- TraceGrid ---\n" );
                SetupEnvelopes( qtrue, fastgrid );
                
                Sys_Printf( "--- TraceGrid ---\n" );
+               ps = patchShadows;
+               patchShadows = qfalse; /* patch shadows + lightgrid sampling tends to sample between patch and caulk, so let's turn that off for now FIXME */
                RunThreadsOnIndividual( numRawGridPoints, qtrue, TraceGrid );
                RunThreadsOnIndividual( numRawGridPoints, qtrue, TraceGrid );
+               patchShadows = ps;
                Sys_Printf( "%d x %d x %d = %d grid\n",
                        gridBounds[ 0 ], gridBounds[ 1 ], gridBounds[ 2 ], numBSPGridPoints );
                
                Sys_Printf( "%d x %d x %d = %d grid\n",
                        gridBounds[ 0 ], gridBounds[ 1 ], gridBounds[ 2 ], numBSPGridPoints );
                
@@ -1798,7 +1800,10 @@ void LightWorld( void )
                        gridBoundsCulled = 0;
                        
                        Sys_Printf( "--- BounceGrid ---\n" );
                        gridBoundsCulled = 0;
                        
                        Sys_Printf( "--- BounceGrid ---\n" );
+                       ps = patchShadows;
+                       patchShadows = qfalse; /* patch shadows + lightgrid sampling tends to sample between patch and caulk, so let's turn that off for now FIXME */
                        RunThreadsOnIndividual( numRawGridPoints, qtrue, TraceGrid );
                        RunThreadsOnIndividual( numRawGridPoints, qtrue, TraceGrid );
+                       patchShadows = ps;
                        Sys_FPrintf( SYS_VRB, "%9d grid points envelope culled\n", gridEnvelopeCulled );
                        Sys_FPrintf( SYS_VRB, "%9d grid points bounds culled\n", gridBoundsCulled );
                }
                        Sys_FPrintf( SYS_VRB, "%9d grid points envelope culled\n", gridEnvelopeCulled );
                        Sys_FPrintf( SYS_VRB, "%9d grid points bounds culled\n", gridBoundsCulled );
                }