* -brightness only affects lightmap brightness, like q3map_lightmapBrightness, as there are -vertexscale and -gridscale for the rest
is multipled with q3map_lightmapBrightness
This commit is contained in:
parent
3f2825b8ec
commit
c401adfe3e
|
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user