diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index 015305f7..1526774e 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -2422,11 +2422,10 @@ int LightMain( int argc, char **argv ){ i++; } - /* Lighting brightness */ + /* Lightmaps brightness */ else if( !strcmp( argv[ i ], "-brightness" ) ){ - f = atof( argv[ i + 1 ] ); - lightmapBrightness = f; - Sys_Printf( "Lighting brightness set to %f\n", lightmapBrightness ); + lightmapBrightness = atof( argv[ i + 1 ] ); + Sys_Printf( "Scaling lightmaps brightness by %f\n", lightmapBrightness ); i++; } diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 2f351e89..10b190fe 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -55,8 +55,6 @@ void ColorToBytes( const float *color, byte *colorBytes, float scale ){ if ( scale <= 0.0f ) { scale = 1.0f; } - /* globally */ - scale *= lightmapBrightness; /* make a local copy */ VectorScale( color, scale, sample ); diff --git a/tools/quake3/q3map2/shaders.c b/tools/quake3/q3map2/shaders.c index 261f3635..63ba23a9 100644 --- a/tools/quake3/q3map2/shaders.c +++ b/tools/quake3/q3map2/shaders.c @@ -660,6 +660,7 @@ static shaderInfo_t *AllocShaderInfo( void ){ si->patchShadows = qfalse; si->vertexShadows = qtrue; /* ydnar: changed default behavior */ si->forceSunlight = qfalse; + si->lmBrightness = lightmapBrightness; si->vertexScale = vertexglobalscale; si->notjunc = qfalse; @@ -1599,7 +1600,7 @@ static void ParseShaderFile( const char *filename ){ /* ydnar: q3map_lightmapBrightness N (for autogenerated shaders + external tga lightmaps) */ else if ( !Q_stricmp( token, "q3map_lightmapBrightness" ) || !Q_stricmp( token, "q3map_lightmapGamma" ) ) { GetTokenAppend( shaderText, qfalse ); - si->lmBrightness = atof( token ); + si->lmBrightness *= atof( token ); if ( si->lmBrightness < 0 ) { si->lmBrightness = 1.0; }