From c60d22dd261eb98e1cdfa4d1ef2b36913f4e29b5 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 9 Feb 2012 10:40:48 +0100 Subject: [PATCH] swap values 0 and 1 for -exposure (now -exposure 0 does nothing, -exposure 1 did what 0 did before) --- tools/quake3/q3map2/game_ef.h | 2 +- tools/quake3/q3map2/game_etut.h | 2 +- tools/quake3/q3map2/game_ja.h | 2 +- tools/quake3/q3map2/game_jk2.h | 2 +- tools/quake3/q3map2/game_nexuiz.h | 2 +- tools/quake3/q3map2/game_qfusion.h | 2 +- tools/quake3/q3map2/game_quake3.h | 2 +- tools/quake3/q3map2/game_quakelive.h | 2 +- tools/quake3/q3map2/game_reaction.h | 2 +- tools/quake3/q3map2/game_sof2.h | 2 +- tools/quake3/q3map2/game_tenebrae.h | 2 +- tools/quake3/q3map2/game_tremulous.h | 2 +- tools/quake3/q3map2/game_wolf.h | 2 +- tools/quake3/q3map2/game_wolfet.h | 2 +- tools/quake3/q3map2/game_xonotic.h | 2 +- tools/quake3/q3map2/light_ydnar.c | 6 +----- tools/quake3/q3map2/q3map2.h | 2 +- 17 files changed, 17 insertions(+), 21 deletions(-) diff --git a/tools/quake3/q3map2/game_ef.h b/tools/quake3/q3map2/game_ef.h index 7800f2bb..374e932d 100644 --- a/tools/quake3/q3map2/game_ef.h +++ b/tools/quake3/q3map2/game_ef.h @@ -116,7 +116,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_etut.h b/tools/quake3/q3map2/game_etut.h index ebc0b92c..4b12631f 100644 --- a/tools/quake3/q3map2/game_etut.h +++ b/tools/quake3/q3map2/game_etut.h @@ -151,7 +151,7 @@ game_t struct qtrue, /* lightmap sRGB */ qfalse, /* texture sRGB (yes, this is incorrect, but we better match ET:UT) */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_ja.h b/tools/quake3/q3map2/game_ja.h index daf1f803..71f078d2 100644 --- a/tools/quake3/q3map2/game_ja.h +++ b/tools/quake3/q3map2/game_ja.h @@ -70,7 +70,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_jk2.h b/tools/quake3/q3map2/game_jk2.h index b56e6e11..1f763b39 100644 --- a/tools/quake3/q3map2/game_jk2.h +++ b/tools/quake3/q3map2/game_jk2.h @@ -67,7 +67,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_nexuiz.h b/tools/quake3/q3map2/game_nexuiz.h index dcfc0a22..71f9bec5 100644 --- a/tools/quake3/q3map2/game_nexuiz.h +++ b/tools/quake3/q3map2/game_nexuiz.h @@ -66,7 +66,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_qfusion.h b/tools/quake3/q3map2/game_qfusion.h index 1a2c926f..8607ecf3 100644 --- a/tools/quake3/q3map2/game_qfusion.h +++ b/tools/quake3/q3map2/game_qfusion.h @@ -118,7 +118,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_quake3.h b/tools/quake3/q3map2/game_quake3.h index 90a066e5..62d4de61 100644 --- a/tools/quake3/q3map2/game_quake3.h +++ b/tools/quake3/q3map2/game_quake3.h @@ -115,7 +115,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_quakelive.h b/tools/quake3/q3map2/game_quakelive.h index e6703fc9..54661b42 100644 --- a/tools/quake3/q3map2/game_quakelive.h +++ b/tools/quake3/q3map2/game_quakelive.h @@ -67,7 +67,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_reaction.h b/tools/quake3/q3map2/game_reaction.h index 55b19c3f..6a31d8a9 100644 --- a/tools/quake3/q3map2/game_reaction.h +++ b/tools/quake3/q3map2/game_reaction.h @@ -87,7 +87,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_sof2.h b/tools/quake3/q3map2/game_sof2.h index adce6b67..95e99e7b 100644 --- a/tools/quake3/q3map2/game_sof2.h +++ b/tools/quake3/q3map2/game_sof2.h @@ -142,7 +142,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_tenebrae.h b/tools/quake3/q3map2/game_tenebrae.h index 081c9c4d..57fff05b 100644 --- a/tools/quake3/q3map2/game_tenebrae.h +++ b/tools/quake3/q3map2/game_tenebrae.h @@ -115,7 +115,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_tremulous.h b/tools/quake3/q3map2/game_tremulous.h index a74c539c..e9a33566 100644 --- a/tools/quake3/q3map2/game_tremulous.h +++ b/tools/quake3/q3map2/game_tremulous.h @@ -73,7 +73,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_wolf.h b/tools/quake3/q3map2/game_wolf.h index d16e2db5..d802b7ce 100644 --- a/tools/quake3/q3map2/game_wolf.h +++ b/tools/quake3/q3map2/game_wolf.h @@ -132,7 +132,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_wolfet.h b/tools/quake3/q3map2/game_wolfet.h index f6c69d1d..b094d71f 100644 --- a/tools/quake3/q3map2/game_wolfet.h +++ b/tools/quake3/q3map2/game_wolfet.h @@ -69,7 +69,7 @@ game_t struct qfalse, /* lightmap sRGB */ qfalse, /* texture sRGB */ qfalse, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/game_xonotic.h b/tools/quake3/q3map2/game_xonotic.h index cf754854..8b66b90c 100644 --- a/tools/quake3/q3map2/game_xonotic.h +++ b/tools/quake3/q3map2/game_xonotic.h @@ -66,7 +66,7 @@ game_t struct qtrue, /* lightmap sRGB */ qtrue, /* texture sRGB */ qtrue, /* color sRGB */ - 1.0f, /* lightmap exposure */ + 0.0f, /* lightmap exposure */ 1.0f, /* lightmap compensate */ 1.0f, /* lightgrid scale */ 1.0f, /* lightgrid ambient scale */ diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 3bf04ba7..e08b12f5 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -74,7 +74,7 @@ void ColorToBytes( const float *color, byte *colorBytes, float scale ) sample[ i ] = pow( sample[ i ] / 255.0f, gamma ) * 255.0f; } - if (lightmapExposure == 1) + if (lightmapExposure == 0) { /* clamp with color normalization */ max = sample[ 0 ]; @@ -87,10 +87,6 @@ void ColorToBytes( const float *color, byte *colorBytes, float scale ) } else { - if (lightmapExposure==0) - { - lightmapExposure=1.0f; - } inv=1.f/lightmapExposure; //Exposure diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index 1a5ba29d..17b711b3 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -2304,7 +2304,7 @@ Q_EXTERN float lightmapGamma Q_ASSIGN( 1.0f ); Q_EXTERN float lightmapsRGB Q_ASSIGN( qfalse ); Q_EXTERN float texturesRGB 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 ); /* ydnar: for runtime tweaking of falloff tolerance */ -- 2.39.2