]> icculus.org git repositories - divverent/nexuiz.git/blob - misc/gtkradiant/singlepatches/q3map2-UTfloodlight.diff
update the patches: fix unnecessary whitespace at line ends, and update line numbers
[divverent/nexuiz.git] / misc / gtkradiant / singlepatches / q3map2-UTfloodlight.diff
1 Index: tools/quake3/q3map2/light_ydnar.c
2 ===================================================================
3 --- tools/quake3/q3map2/light_ydnar.c.orig      2008-09-06 15:32:04.000000000 +0200
4 +++ tools/quake3/q3map2/light_ydnar.c   2008-09-06 15:32:14.000000000 +0200
5 @@ -1767,6 +1767,8 @@
6         float                           tests[ 4 ][ 2 ] = { { 0.0f, 0 }, { 1, 0 }, { 0, 1 }, { 1, 1 } };
7         trace_t                         trace;
8         float                           stackLightLuxels[ STACK_LL_SIZE ];
9 +       vec3_t                          flood;
10 +       float                           *floodlight;
11         
12         
13         /* bail if this number exceeds the number of raw lightmaps */
14 @@ -2223,6 +2225,78 @@
15         FreeTraceLights( &trace );
16         
17         /*      -----------------------------------------------------------------
18 +               floodlight pass
19 +               ----------------------------------------------------------------- */
20 +
21 +       if( floodlighty )
22 +       {
23 +               /* walk lightmaps */
24 +               for( lightmapNum = 0; lightmapNum < MAX_LIGHTMAPS; lightmapNum++ )
25 +               {
26 +                       /* early out */
27 +                       if( lm->superLuxels[ lightmapNum ] == NULL )
28 +                               continue;
29 +
30 +                       /* apply floodlight to each luxel */
31 +                       for( y = 0; y < lm->sh; y++ )
32 +                       {
33 +                               for( x = 0; x < lm->sw; x++ )
34 +                               {
35 +                                       /* get cluster */
36 +                                       cluster = SUPER_CLUSTER( x, y );
37 +                                       //%     if( *cluster < 0 )
38 +                                       //%             continue;
39 +
40 +                                       /* get particulars */
41 +                                       luxel = SUPER_LUXEL( lightmapNum, x, y );
42 +                                       floodlight = SUPER_FLOODLIGHT( x, y );
43 +
44 +                                       flood[0]=floodlightRGB[0]*floodlightIntensity;
45 +                                       flood[1]=floodlightRGB[1]*floodlightIntensity;
46 +                                       flood[2]=floodlightRGB[2]*floodlightIntensity;
47 +
48 +                                       /* scale light value */
49 +                                       VectorScale( flood, *floodlight, flood );
50 +                                       luxel[0]+=flood[0];
51 +                                       luxel[1]+=flood[1];
52 +                                       luxel[2]+=flood[2];
53 +
54 +                                       if (luxel[3]==0) luxel[3]=1;
55 +                               }
56 +                       }
57 +               }
58 +       }
59 +
60 +       if (debugnormals)
61 +       {
62 +               for( lightmapNum = 0; lightmapNum < MAX_LIGHTMAPS; lightmapNum++ )
63 +               {
64 +                       /* early out */
65 +                       if( lm->superLuxels[ lightmapNum ] == NULL )
66 +                               continue;
67 +
68 +                       for( y = 0; y < lm->sh; y++ )
69 +                       {
70 +                               for( x = 0; x < lm->sw; x++ )
71 +                               {
72 +                                       /* get cluster */
73 +                                       cluster = SUPER_CLUSTER( x, y );
74 +                                       //%     if( *cluster < 0 )
75 +                                       //%             continue;
76 +
77 +                                       /* get particulars */
78 +                                       luxel = SUPER_LUXEL( lightmapNum, x, y );
79 +                                       normal = SUPER_NORMAL (  x, y );
80 +
81 +                                       luxel[0]=(normal[0]*127)+127;
82 +                                       luxel[1]=(normal[1]*127)+127;
83 +                                       luxel[2]=(normal[2]*127)+127;
84 +                               }
85 +                       }
86 +               }
87 +       }
88 +
89 +       /*      -----------------------------------------------------------------
90                 dirt pass
91                 ----------------------------------------------------------------- */
92         
93 @@ -3587,7 +3661,320 @@
94         CreateTraceLightsForBounds( mins, maxs, normal, info->numSurfaceClusters, &surfaceClusters[ info->firstSurfaceCluster ], LIGHT_SURFACES, trace );
95  }
96  
97 +/////////////////////////////////////////////////////////////
98 +
99 +#define FLOODLIGHT_CONE_ANGLE                  88      /* degrees */
100 +#define FLOODLIGHT_NUM_ANGLE_STEPS             16
101 +#define FLOODLIGHT_NUM_ELEVATION_STEPS 4
102 +#define FLOODLIGHT_NUM_VECTORS                 (FLOODLIGHT_NUM_ANGLE_STEPS * FLOODLIGHT_NUM_ELEVATION_STEPS)
103 +
104 +static vec3_t  floodVectors[ FLOODLIGHT_NUM_VECTORS ];
105 +static int             numFloodVectors = 0;
106 +
107 +void SetupFloodLight( void )
108 +{
109 +       int             i, j;
110 +       float   angle, elevation, angleStep, elevationStep;
111 +       const char      *value;
112 +       double v1,v2,v3,v4,v5;
113 +
114 +       /* note it */
115 +       Sys_FPrintf( SYS_VRB, "--- SetupFloodLight ---\n" );
116 +
117 +       /* calculate angular steps */
118 +       angleStep = DEG2RAD( 360.0f / FLOODLIGHT_NUM_ANGLE_STEPS );
119 +       elevationStep = DEG2RAD( FLOODLIGHT_CONE_ANGLE / FLOODLIGHT_NUM_ELEVATION_STEPS );
120 +
121 +       /* iterate angle */
122 +       angle = 0.0f;
123 +       for( i = 0, angle = 0.0f; i < FLOODLIGHT_NUM_ANGLE_STEPS; i++, angle += angleStep )
124 +       {
125 +               /* iterate elevation */
126 +               for( j = 0, elevation = elevationStep * 0.5f; j < FLOODLIGHT_NUM_ELEVATION_STEPS; j++, elevation += elevationStep )
127 +               {
128 +                       floodVectors[ numFloodVectors ][ 0 ] = sin( elevation ) * cos( angle );
129 +                       floodVectors[ numFloodVectors ][ 1 ] = sin( elevation ) * sin( angle );
130 +                       floodVectors[ numFloodVectors ][ 2 ] = cos( elevation );
131 +                       numFloodVectors++;
132 +               }
133 +       }
134 +
135 +       /* emit some statistics */
136 +       Sys_FPrintf( SYS_VRB, "%9d numFloodVectors\n", numFloodVectors );
137  
138 +      /* floodlight */
139 +       value = ValueForKey( &entities[ 0 ], "_floodlight" );
140  
141 +       if( value[ 0 ] != '\0' )
142 +       {
143 +               v1=v2=v3=0;
144 +               v4=floodlightDistance;
145 +               v5=floodlightIntensity;
146 +
147 +               sscanf( value, "%lf %lf %lf %lf %lf", &v1, &v2, &v3, &v4, &v5);
148 +
149 +               floodlightRGB[0]=v1;
150 +               floodlightRGB[1]=v2;
151 +               floodlightRGB[2]=v3;
152 +
153 +               if (VectorLength(floodlightRGB)==0)
154 +               {
155 +                       VectorSet(floodlightRGB,240,240,255);
156 +               }
157  
158 +               if (v4<1) v4=1024;
159 +               if (v5<1) v5=128;
160 +
161 +               floodlightDistance=v4;
162 +               floodlightIntensity=v5;
163 +
164 +               floodlighty = qtrue;
165 +               Sys_Printf( "FloodLighting enabled via worldspawn _floodlight key.\n" );
166 +       }
167 +       else
168 +       {
169 +               VectorSet(floodlightRGB,240,240,255);
170 +               //floodlighty = qtrue;
171 +               //Sys_Printf( "FloodLighting enabled via worldspawn _floodlight key.\n" );
172 +       }
173 +       VectorNormalize(floodlightRGB,floodlightRGB);
174 +}
175 +
176 +//27 - lighttracer style ambient occlusion light hack.
177 +//Kudos to the dirtmapping author for most of this source.
178 +void FloodLightRawLightmap( int rawLightmapNum )
179 +{
180 +       int                                     i, x, y, sx, sy, *cluster;
181 +       float                           *origin, *normal, *floodlight, *floodlight2, average, samples;
182 +       rawLightmap_t           *lm;
183 +       surfaceInfo_t           *info;
184 +       trace_t                         trace;
185 +
186 +       /* bail if this number exceeds the number of raw lightmaps */
187 +       if( rawLightmapNum >= numRawLightmaps )
188 +               return;
189 +
190 +       /* get lightmap */
191 +       lm = &rawLightmaps[ rawLightmapNum ];
192 +
193 +       memset(&trace,0,sizeof(trace_t));
194 +       /* setup trace */
195 +       trace.testOcclusion = qtrue;
196 +       trace.forceSunlight = qfalse;
197 +       trace.twoSided = qtrue;
198 +       trace.recvShadows = lm->recvShadows;
199 +       trace.numSurfaces = lm->numLightSurfaces;
200 +       trace.surfaces = &lightSurfaces[ lm->firstLightSurface ];
201 +       trace.inhibitRadius = DEFAULT_INHIBIT_RADIUS;
202 +       trace.testAll = qfalse;
203 +       trace.distance = 1024;
204 +
205 +       /* twosided lighting (may or may not be a good idea for lightmapped stuff) */
206 +       //trace.twoSided = qfalse;
207 +       for( i = 0; i < trace.numSurfaces; i++ )
208 +       {
209 +               /* get surface */
210 +               info = &surfaceInfos[ trace.surfaces[ i ] ];
211 +
212 +               /* check twosidedness */
213 +               if( info->si->twoSided )
214 +               {
215 +                       trace.twoSided = qtrue;
216 +                       break;
217 +               }
218 +       }
219 +
220 +       /* gather dirt */
221 +       for( y = 0; y < lm->sh; y++ )
222 +       {
223 +               for( x = 0; x < lm->sw; x++ )
224 +               {
225 +                       /* get luxel */
226 +                       cluster = SUPER_CLUSTER( x, y );
227 +                       origin = SUPER_ORIGIN( x, y );
228 +                       normal = SUPER_NORMAL( x, y );
229 +                       floodlight = SUPER_FLOODLIGHT( x, y );
230 +
231 +                       /* set default dirt */
232 +                       *floodlight = 0.0f;
233 +
234 +                       /* only look at mapped luxels */
235 +                       if( *cluster < 0 )
236 +                               continue;
237 +
238 +                       /* copy to trace */
239 +                       trace.cluster = *cluster;
240 +                       VectorCopy( origin, trace.origin );
241 +                       VectorCopy( normal, trace.normal );
242 +
243 +
244 +
245 +                       /* get dirt */
246 +                       *floodlight = FloodLightForSample( &trace );
247 +               }
248 +       }
249 +
250 +       /* testing no filtering */
251 +       return;
252 +
253 +       /* filter "dirt" */
254 +       for( y = 0; y < lm->sh; y++ )
255 +       {
256 +               for( x = 0; x < lm->sw; x++ )
257 +               {
258 +                       /* get luxel */
259 +                       cluster = SUPER_CLUSTER( x, y );
260 +                       floodlight = SUPER_FLOODLIGHT( x, y );
261 +
262 +                       /* filter dirt by adjacency to unmapped luxels */
263 +                       average = *floodlight;
264 +                       samples = 1.0f;
265 +                       for( sy = (y - 1); sy <= (y + 1); sy++ )
266 +                       {
267 +                               if( sy < 0 || sy >= lm->sh )
268 +                                       continue;
269 +
270 +                               for( sx = (x - 1); sx <= (x + 1); sx++ )
271 +                               {
272 +                                       if( sx < 0 || sx >= lm->sw || (sx == x && sy == y) )
273 +                                               continue;
274 +
275 +                                       /* get neighboring luxel */
276 +                                       cluster = SUPER_CLUSTER( sx, sy );
277 +                                       floodlight2 = SUPER_FLOODLIGHT( sx, sy );
278 +                                       if( *cluster < 0 || *floodlight2 <= 0.0f )
279 +                                               continue;
280 +
281 +                                       /* add it */
282 +                                       average += *floodlight2;
283 +                                       samples += 1.0f;
284 +                               }
285 +
286 +                               /* bail */
287 +                               if( samples <= 0.0f )
288 +                                       break;
289 +                       }
290 +
291 +                       /* bail */
292 +                       if( samples <= 0.0f )
293 +                               continue;
294 +
295 +                       /* scale dirt */
296 +                       *floodlight = average / samples;
297 +               }
298 +       }
299 +}
300 +
301 +/*
302 +FloodLightForSample()
303 +calculates floodlight value for a given sample
304 +once again, kudos to the dirtmapping coder
305 +*/
306 +float FloodLightForSample( trace_t *trace )
307 +{
308 +       int             i;
309 +       float   d;
310 +       float   contribution;
311 +       int     sub = 0;
312 +       float   gatherLight, outLight;
313 +       vec3_t  normal, worldUp, myUp, myRt, direction, displacement;
314 +       float   dd;
315 +       int     vecs = 0;
316 +
317 +       gatherLight=0;
318 +       /* dummy check */
319 +       //if( !dirty )
320 +       //      return 1.0f;
321 +       if( trace == NULL || trace->cluster < 0 )
322 +               return 0.0f;
323 +
324 +
325 +       /* setup */
326 +       dd = floodlightDistance;
327 +       VectorCopy( trace->normal, normal );
328 +
329 +       /* check if the normal is aligned to the world-up */
330 +       if( normal[ 0 ] == 0.0f && normal[ 1 ] == 0.0f )
331 +       {
332 +               if( normal[ 2 ] == 1.0f )
333 +               {
334 +                       VectorSet( myRt, 1.0f, 0.0f, 0.0f );
335 +                       VectorSet( myUp, 0.0f, 1.0f, 0.0f );
336 +               }
337 +               else if( normal[ 2 ] == -1.0f )
338 +               {
339 +                       VectorSet( myRt, -1.0f, 0.0f, 0.0f );
340 +                       VectorSet( myUp,  0.0f, 1.0f, 0.0f );
341 +               }
342 +       }
343 +       else
344 +       {
345 +               VectorSet( worldUp, 0.0f, 0.0f, 1.0f );
346 +               CrossProduct( normal, worldUp, myRt );
347 +               VectorNormalize( myRt, myRt );
348 +               CrossProduct( myRt, normal, myUp );
349 +               VectorNormalize( myUp, myUp );
350 +       }
351 +
352 +       /* iterate through ordered vectors */
353 +       for( i = 0; i < numFloodVectors; i++ )
354 +       {
355 +               if (floodlight_lowquality==qtrue)
356 +        {
357 +                       if (rand()%10 != 0 ) continue;
358 +               }
359 +
360 +               vecs++;
361 +
362 +               /* transform vector into tangent space */
363 +               direction[ 0 ] = myRt[ 0 ] * floodVectors[ i ][ 0 ] + myUp[ 0 ] * floodVectors[ i ][ 1 ] + normal[ 0 ] * floodVectors[ i ][ 2 ];
364 +               direction[ 1 ] = myRt[ 1 ] * floodVectors[ i ][ 0 ] + myUp[ 1 ] * floodVectors[ i ][ 1 ] + normal[ 1 ] * floodVectors[ i ][ 2 ];
365 +               direction[ 2 ] = myRt[ 2 ] * floodVectors[ i ][ 0 ] + myUp[ 2 ] * floodVectors[ i ][ 1 ] + normal[ 2 ] * floodVectors[ i ][ 2 ];
366 +
367 +               /* set endpoint */
368 +               VectorMA( trace->origin, dd, direction, trace->end );
369 +
370 +               //VectorMA( trace->origin, 1, direction, trace->origin );
371 +
372 +               SetupTrace( trace );
373 +               /* trace */
374 +               TraceLine( trace );
375 +               contribution=1;
376 +
377 +               if (trace->compileFlags & C_SKY )
378 +               {
379 +                       contribution=1.0f;
380 +               }
381 +               else if ( trace->opaque )
382 +               {
383 +                       VectorSubtract( trace->hit, trace->origin, displacement );
384 +                       d=VectorLength( displacement );
385 +
386 +                       // d=trace->distance;
387 +                       //if (d>256) gatherDirt+=1;
388 +                       contribution=d/dd;
389 +                       if (contribution>1) contribution=1.0f;
390 +
391 +                       //gatherDirt += 1.0f - ooDepth * VectorLength( displacement );
392 +               }
393 +
394 +               gatherLight+=contribution;
395 +       }
396 +
397 +       /* early out */
398 +       if( gatherLight <= 0.0f )
399 +               return 0.0f;
400 +
401 +       sub=vecs;
402 +
403 +       if (sub<1) sub=1;
404 +       gatherLight/=(sub);
405 +
406 +       outLight=gatherLight;
407 +       if( outLight > 1.0f )
408 +               outLight = 1.0f;
409 +
410 +       /* return to sender */
411 +       return outLight;
412 +}
413  
414 Index: tools/quake3/q3map2/light.c
415 ===================================================================
416 --- tools/quake3/q3map2/light.c.orig    2008-09-06 15:32:04.000000000 +0200
417 +++ tools/quake3/q3map2/light.c 2008-09-06 15:32:14.000000000 +0200
418 @@ -1378,6 +1378,56 @@
419                         break;
420         }
421         
422 +       /////// Floodlighting for point //////////////////
423 +       //do our floodlight ambient occlusion loop, and add a single contribution based on the brightest dir
424 +       if (floodlighty)
425 +       {
426 +               int q;
427 +               float addSize,f;
428 +               vec3_t col,dir;
429 +               col[0]=col[1]=col[2]=floodlightIntensity;
430 +               dir[0]=dir[1]=0;
431 +               dir[2]=1;
432 +
433 +               trace.testOcclusion = qtrue;
434 +               trace.forceSunlight = qfalse;
435 +               trace.inhibitRadius = DEFAULT_INHIBIT_RADIUS;
436 +               trace.testAll = qtrue;
437 +
438 +               for (q=0;q<2;q++)
439 +               {
440 +                       if (q==0) //upper hemisphere
441 +                       {
442 +                               trace.normal[0]=0;
443 +                               trace.normal[1]=0;
444 +                               trace.normal[2]=1;
445 +                       }
446 +                       else //lower hemisphere
447 +                       {
448 +                               trace.normal[0]=0;
449 +                               trace.normal[1]=0;
450 +                               trace.normal[2]=-1;
451 +                       }
452 +
453 +                       f = FloodLightForSample(&trace);
454 +
455 +                       contributions[ numCon ].color[0]=col[0]*f;
456 +                       contributions[ numCon ].color[1]=col[1]*f;
457 +                       contributions[ numCon ].color[2]=col[2]*f;
458 +
459 +                       contributions[ numCon ].dir[0]=dir[0];
460 +                       contributions[ numCon ].dir[1]=dir[1];
461 +                       contributions[ numCon ].dir[2]=dir[2];
462 +
463 +                       contributions[ numCon ].style = 0;
464 +                       numCon++;
465 +                       /* push average direction around */
466 +                       addSize = VectorLength( col );
467 +                       VectorMA( gp->dir, addSize, dir, gp->dir );
468 +               }
469 +       }
470 +       /////////////////////
471 +
472         /* normalize to get primary light direction */
473         VectorNormalize( gp->dir, gp->dir );
474         
475 @@ -1661,6 +1711,12 @@
476                 RunThreadsOnIndividual( numRawLightmaps, qtrue, DirtyRawLightmap );
477         }
478         
479 +       /* floodlight them up */
480 +       if( floodlighty )
481 +       {
482 +               Sys_Printf( "--- FloodlightRawLightmap ---\n" );
483 +               RunThreadsOnIndividual( numRawLightmaps, qtrue, FloodLightRawLightmap );
484 +       }
485  
486         /* ydnar: set up light envelopes */
487         SetupEnvelopes( qfalse, fast );
488 @@ -1703,6 +1759,7 @@
489                 /* flag bouncing */
490                 bouncing = qtrue;
491                 VectorClear( ambientColor );
492 +               floodlighty = false;
493                 
494                 /* generate diffuse lights */
495                 RadFreeLights();
496 @@ -2191,6 +2248,21 @@
497                         cpmaHack = qtrue;
498                         Sys_Printf( "Enabling Challenge Pro Mode Asstacular Vertex Lighting Mode (tm)\n" );
499                 }
500 +               else if( !strcmp( argv[ i ], "-floodlight" ) )
501 +               {
502 +                       floodlighty = qtrue;
503 +                       Sys_Printf( "FloodLighting enabled\n" );
504 +               }
505 +               else if( !strcmp( argv[ i ], "-debugnormals" ) )
506 +               {
507 +                       debugnormals = qtrue;
508 +                       Sys_Printf( "DebugNormals enabled\n" );
509 +               }
510 +               else if( !strcmp( argv[ i ], "-lowquality" ) )
511 +               {
512 +                       floodlight_lowquality = qtrue;
513 +                       Sys_Printf( "Low Quality FloodLighting enabled\n" );
514 +               }
515                 
516                 /* r7: dirtmapping */
517                 else if( !strcmp( argv[ i ], "-dirty" ) )
518 @@ -2279,6 +2351,7 @@
519         /* ydnar: set up optimization */
520         SetupBrushes();
521         SetupDirt();
522 +       SetupFloodLight();
523         SetupSurfaceLightmaps();
524         
525         /* initialize the surface facet tracing */
526 Index: tools/quake3/q3map2/lightmaps_ydnar.c
527 ===================================================================
528 --- tools/quake3/q3map2/lightmaps_ydnar.c.orig  2008-09-06 15:32:04.000000000 +0200
529 +++ tools/quake3/q3map2/lightmaps_ydnar.c       2008-09-06 15:32:14.000000000 +0200
530 @@ -414,6 +414,12 @@
531                 lm->superNormals = safe_malloc( size );
532         memset( lm->superNormals, 0, size );
533         
534 +       /* allocate floodlight map storage */
535 +       size = lm->sw * lm->sh * SUPER_FLOODLIGHT_SIZE * sizeof( float );
536 +       if( lm->superFloodLight == NULL )
537 +               lm->superFloodLight = safe_malloc( size );
538 +       memset( lm->superFloodLight, 0, size );
539 +
540         /* allocate cluster map storage */
541         size = lm->sw * lm->sh * sizeof( int );
542         if( lm->superClusters == NULL )
543 Index: tools/quake3/q3map2/q3map2.h
544 ===================================================================
545 --- tools/quake3/q3map2/q3map2.h.orig   2008-09-06 15:32:04.000000000 +0200
546 +++ tools/quake3/q3map2/q3map2.h        2008-09-06 15:32:14.000000000 +0200
547 @@ -266,6 +266,7 @@
548  #define SUPER_NORMAL_SIZE              4
549  #define SUPER_DELUXEL_SIZE             3
550  #define BSP_DELUXEL_SIZE               3
551 +#define SUPER_FLOODLIGHT_SIZE  1
552  
553  #define VERTEX_LUXEL( s, v )   (vertexLuxels[ s ] + ((v) * VERTEX_LUXEL_SIZE))
554  #define RAD_VERTEX_LUXEL( s, v )(radVertexLuxels[ s ] + ((v) * VERTEX_LUXEL_SIZE))
555 @@ -278,6 +279,7 @@
556  #define SUPER_ORIGIN( x, y )   (lm->superOrigins + ((((y) * lm->sw) + (x)) * SUPER_ORIGIN_SIZE))
557  #define SUPER_NORMAL( x, y )   (lm->superNormals + ((((y) * lm->sw) + (x)) * SUPER_NORMAL_SIZE))
558  #define SUPER_DIRT( x, y )             (lm->superNormals + ((((y) * lm->sw) + (x)) * SUPER_NORMAL_SIZE) + 3)   /* stash dirtyness in normal[ 3 ] */
559 +#define SUPER_FLOODLIGHT( x, y )       (lm->superFloodLight + ((((y) * lm->sw) + (x)) * SUPER_FLOODLIGHT_SIZE) )
560  
561  
562  
563 @@ -1400,6 +1402,7 @@
564         
565         float                                   *superDeluxels; /* average light direction */
566         float                                   *bspDeluxels;
567 +       float                                   *superFloodLight;
568  }
569  rawLightmap_t;
570  
571 @@ -1712,6 +1715,10 @@
572  float                                          DirtForSample( trace_t *trace );
573  void                                           DirtyRawLightmap( int num );
574  
575 +void                                           SetupFloodLight();
576 +float                                          FloodLightForSample( trace_t *trace );
577 +void                                           FloodLightRawLightmap( int num );
578 +
579  void                                           IlluminateRawLightmap( int num );
580  void                                           IlluminateVertexes( int num );
581  
582 @@ -2106,6 +2113,13 @@
583  Q_EXTERN float                         dirtScale Q_ASSIGN( 1.0f );
584  Q_EXTERN float                         dirtGain Q_ASSIGN( 1.0f );
585  
586 +Q_EXTERN qboolean                      debugnormals Q_ASSIGN( qfalse );
587 +Q_EXTERN qboolean                      floodlighty Q_ASSIGN( qfalse );
588 +Q_EXTERN qboolean                      floodlight_lowquality Q_ASSIGN( qfalse );
589 +Q_EXTERN vec3_t                                floodlightRGB;
590 +Q_EXTERN float                         floodlightIntensity Q_ASSIGN( 512 );
591 +Q_EXTERN float                         floodlightDistance Q_ASSIGN( 1024 );
592 +
593  Q_EXTERN qboolean                      dump Q_ASSIGN( qfalse );
594  Q_EXTERN qboolean                      debug Q_ASSIGN( qfalse );
595  Q_EXTERN qboolean                      debugUnused Q_ASSIGN( qfalse );