i++;
}
+ else if( !strcmp( argv[ i ], "-samplessearchboxsize" ) )
+ {
+ lightSamplesSearchBoxSize = atoi( argv[ i + 1 ] );
+ if( lightSamplesSearchBoxSize <= 0 )
+ lightSamplesSearchBoxSize = 1;
+ if( lightSamplesSearchBoxSize > 4 )
+ lightSamplesSearchBoxSize = 4; /* more makes no sense */
+ else if( lightSamplesSearchBoxSize != 1 )
+ Sys_Printf( "Adaptive supersampling uses %f times the normal search box size\n", lightSamplesSearchBoxSize );
+ i++;
+ }
+
else if( !strcmp( argv[ i ], "-filter" ) )
{
filter = qtrue;
//% continue;
/* subsample it */
- SubsampleRawLuxel_r( lm, &trace, origin, sx, sy, 0.25f, lightLuxel );
- /* will do: first -1/3 .. +1/3, then subsample these corners the same way -> -1/9 .. +1/9 around them, etc. -> 1/3 + 1/9 + 1/27 + ... = 0.5 */
+ SubsampleRawLuxel_r( lm, &trace, origin, sx, sy, 0.25f * lightSamplesSearchBoxSize, lightLuxel );
/* debug code to colorize subsampled areas to yellow */
//% luxel = SUPER_LUXEL( lightmapNum, sx, sy );
Q_EXTERN float shadeAngleDegrees Q_ASSIGN( 0.0f );
Q_EXTERN int superSample Q_ASSIGN( 0 );
Q_EXTERN int lightSamples Q_ASSIGN( 1 );
+Q_EXTERN int lightSamplesSearchBoxSize Q_ASSIGN( 1 );
Q_EXTERN qboolean filter Q_ASSIGN( qfalse );
Q_EXTERN qboolean dark Q_ASSIGN( qfalse );
Q_EXTERN qboolean sunOnly Q_ASSIGN( qfalse );