swap values 0 and 1 for -exposure (now -exposure 0 does nothing, -exposure 1 did what 0 did before)

This commit is contained in:
Rudolf Polzer 2012-02-09 10:40:48 +01:00
parent 42e3d14cd5
commit c60d22dd26
17 changed files with 17 additions and 21 deletions

View File

@ -116,7 +116,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -151,7 +151,7 @@ game_t struct
qtrue, /* lightmap sRGB */ qtrue, /* lightmap sRGB */
qfalse, /* texture sRGB (yes, this is incorrect, but we better match ET:UT) */ qfalse, /* texture sRGB (yes, this is incorrect, but we better match ET:UT) */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -70,7 +70,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -67,7 +67,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -66,7 +66,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -118,7 +118,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -115,7 +115,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -67,7 +67,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -87,7 +87,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -142,7 +142,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -115,7 +115,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -73,7 +73,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -132,7 +132,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -69,7 +69,7 @@ game_t struct
qfalse, /* lightmap sRGB */ qfalse, /* lightmap sRGB */
qfalse, /* texture sRGB */ qfalse, /* texture sRGB */
qfalse, /* color sRGB */ qfalse, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -66,7 +66,7 @@ game_t struct
qtrue, /* lightmap sRGB */ qtrue, /* lightmap sRGB */
qtrue, /* texture sRGB */ qtrue, /* texture sRGB */
qtrue, /* color sRGB */ qtrue, /* color sRGB */
1.0f, /* lightmap exposure */ 0.0f, /* lightmap exposure */
1.0f, /* lightmap compensate */ 1.0f, /* lightmap compensate */
1.0f, /* lightgrid scale */ 1.0f, /* lightgrid scale */
1.0f, /* lightgrid ambient scale */ 1.0f, /* lightgrid ambient scale */

View File

@ -74,7 +74,7 @@ void ColorToBytes( const float *color, byte *colorBytes, float scale )
sample[ i ] = pow( sample[ i ] / 255.0f, gamma ) * 255.0f; sample[ i ] = pow( sample[ i ] / 255.0f, gamma ) * 255.0f;
} }
if (lightmapExposure == 1) if (lightmapExposure == 0)
{ {
/* clamp with color normalization */ /* clamp with color normalization */
max = sample[ 0 ]; max = sample[ 0 ];
@ -87,10 +87,6 @@ void ColorToBytes( const float *color, byte *colorBytes, float scale )
} }
else else
{ {
if (lightmapExposure==0)
{
lightmapExposure=1.0f;
}
inv=1.f/lightmapExposure; inv=1.f/lightmapExposure;
//Exposure //Exposure

View File

@ -2304,7 +2304,7 @@ Q_EXTERN float lightmapGamma Q_ASSIGN( 1.0f );
Q_EXTERN float lightmapsRGB Q_ASSIGN( qfalse ); Q_EXTERN float lightmapsRGB Q_ASSIGN( qfalse );
Q_EXTERN float texturesRGB Q_ASSIGN( qfalse ); Q_EXTERN float texturesRGB Q_ASSIGN( qfalse );
Q_EXTERN float colorsRGB Q_ASSIGN( qfalse ); Q_EXTERN float colorsRGB Q_ASSIGN( qfalse );
Q_EXTERN float lightmapExposure Q_ASSIGN( 1.0f ); Q_EXTERN float lightmapExposure Q_ASSIGN( 0.0f );
Q_EXTERN float lightmapCompensate Q_ASSIGN( 1.0f ); Q_EXTERN float lightmapCompensate Q_ASSIGN( 1.0f );
/* ydnar: for runtime tweaking of falloff tolerance */ /* ydnar: for runtime tweaking of falloff tolerance */