i++;
Sys_Printf( "Lightmap sample size set to %dx%d units\n", sampleSize, sampleSize );
}
+ else if( !strcmp( argv[ i ], "-minsamplesize" ) )
+ {
+ minSampleSize = atoi( argv[ i + 1 ] );
+ if( minSampleSize < 1 )
+ minSampleSize = 1;
+ i++;
+ Sys_Printf( "Minimum lightmap sample size set to %dx%d units\n", minSampleSize, minSampleSize );
+ }
else if( !strcmp( argv[ i ], "-custinfoparms") )
{
Sys_Printf( "Custom info parms enabled\n" );
i++;
Sys_Printf( "Default lightmap sample size set to %dx%d units\n", sampleSize, sampleSize );
}
+ else if( !strcmp( argv[ i ], "-minsamplesize" ) )
+ {
+ minSampleSize = atoi( argv[ i + 1 ] );
+ if( minSampleSize < 1 )
+ minSampleSize = 1;
+ i++;
+ Sys_Printf( "Minimum lightmap sample size set to %dx%d units\n", minSampleSize, minSampleSize );
+ }
else if( !strcmp( argv[ i ], "-novertex" ) )
{
noVertexLighting = qtrue;
#define GRID_EPSILON 0.0f
#define DEFAULT_LIGHTMAP_SAMPLE_SIZE 16
+#define DEFAULT_LIGHTMAP_MIN_SAMPLE_SIZE 0
#define DEFAULT_LIGHTMAP_SAMPLE_OFFSET 1.0f
#define DEFAULT_SUBDIVIDE_THRESHOLD 1.0f
int GetSurfaceExtraCastShadows( int num );
int GetSurfaceExtraRecvShadows( int num );
int GetSurfaceExtraSampleSize( int num );
+int GetSurfaceExtraMinSampleSize( int num );
float GetSurfaceExtraLongestCurve( int num );
void GetSurfaceExtraLightmapAxis( int num, vec3_t lightmapAxis );
Q_EXTERN char outbase[ 32 ];
Q_EXTERN int sampleSize; /* lightmap sample size in units */
+Q_EXTERN int minSampleSize; /* minimum sample size to use at all */
Q_EXTERN int mapEntityNum Q_ASSIGN( 0 );
Q_EXTERN qboolean noStyles Q_ASSIGN( qfalse );
Q_EXTERN int sampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_SAMPLE_SIZE );
+Q_EXTERN int minSampleSize Q_ASSIGN( DEFAULT_LIGHTMAP_MIN_SAMPLE_SIZE );
Q_EXTERN qboolean noVertexLighting Q_ASSIGN( qfalse );
Q_EXTERN qboolean noGridLighting Q_ASSIGN( qfalse );
ds->sampleSize *= ds->lightmapScale;
if( ds->sampleSize <= 0 )
ds->sampleSize = 1;
- else if( ds->sampleSize > 16384 ) /* powers of 2 are preferred */
+ if(ds->sampleSize < minSampleSize)
+ ds->sampleSize = minSampleSize;
+ if( ds->sampleSize > 16384 ) /* powers of 2 are preferred */
ds->sampleSize = 16384;
}
}