diff options
Diffstat (limited to 'src/renderergl2')
-rw-r--r-- | src/renderergl2/tr_image.c | 41 | ||||
-rw-r--r-- | src/renderergl2/tr_init.c | 4 | ||||
-rw-r--r-- | src/renderergl2/tr_local.h | 2 | ||||
-rw-r--r-- | src/renderergl2/tr_shade.c | 2 | ||||
-rw-r--r-- | src/renderergl2/tr_sky.c | 2 |
5 files changed, 7 insertions, 44 deletions
diff --git a/src/renderergl2/tr_image.c b/src/renderergl2/tr_image.c index 7bc9773f..3438c939 100644 --- a/src/renderergl2/tr_image.c +++ b/src/renderergl2/tr_image.c @@ -3014,37 +3014,14 @@ void R_SetColorMappings( void ) { int i, j; float g; int inf; - int shift; // setup the overbright lighting tr.overbrightBits = r_overBrightBits->integer; - if ( !glConfig.deviceSupportsGamma ) { - tr.overbrightBits = 0; // need hardware gamma for overbright - } - - // never overbright in windowed mode without soft overbright - if ( !glConfig.isFullscreen && !r_softOverbright->integer ) - { - tr.overbrightBits = 0; - } - - // never overbright with tonemapping - if ( r_toneMap->integer && r_hdr->integer ) - { - tr.overbrightBits = 0; - } - // allow 2 overbright bits in 24 bit, but only 1 in 16 bit - if ( glConfig.colorBits > 16 ) { - if ( tr.overbrightBits > 2 ) { - tr.overbrightBits = 2; - } - } else { - if ( tr.overbrightBits > 1 ) { - tr.overbrightBits = 1; - } - } - if ( tr.overbrightBits < 0 ) { + // allow 2 overbright bits + if ( tr.overbrightBits > 2 ) { + tr.overbrightBits = 2; + } else if ( tr.overbrightBits < 0 ) { tr.overbrightBits = 0; } @@ -3064,14 +3041,6 @@ void R_SetColorMappings( void ) { g = r_gamma->value; - shift = tr.overbrightBits; - - // no shift with soft overbright - if (r_softOverbright->integer) - { - shift = 0; - } - for ( i = 0; i < 256; i++ ) { int i2; @@ -3089,7 +3058,7 @@ void R_SetColorMappings( void ) { } else { inf = 255 * pow ( i2/255.0f, 1.0f / g ) + 0.5f; } - inf <<= shift; + if (inf < 0) { inf = 0; } diff --git a/src/renderergl2/tr_init.c b/src/renderergl2/tr_init.c index b0120875..0da24dff 100644 --- a/src/renderergl2/tr_init.c +++ b/src/renderergl2/tr_init.c @@ -109,8 +109,6 @@ cvar_t *r_mergeLeafSurfaces; cvar_t *r_cameraExposure; -cvar_t *r_softOverbright; - cvar_t *r_hdr; cvar_t *r_floatLightmap; cvar_t *r_postProcess; @@ -1091,8 +1089,6 @@ void R_Register( void ) r_greyscale = ri.Cvar_Get("r_greyscale", "0", CVAR_ARCHIVE | CVAR_LATCH); ri.Cvar_CheckRange(r_greyscale, 0, 1, qfalse); - r_softOverbright = ri.Cvar_Get( "r_softOverbright", "1", CVAR_ARCHIVE | CVAR_LATCH ); - r_hdr = ri.Cvar_Get( "r_hdr", "1", CVAR_ARCHIVE | CVAR_LATCH ); r_floatLightmap = ri.Cvar_Get( "r_floatLightmap", "0", CVAR_ARCHIVE | CVAR_LATCH ); r_postProcess = ri.Cvar_Get( "r_postProcess", "1", CVAR_ARCHIVE ); diff --git a/src/renderergl2/tr_local.h b/src/renderergl2/tr_local.h index 9a26e39d..3c778cbe 100644 --- a/src/renderergl2/tr_local.h +++ b/src/renderergl2/tr_local.h @@ -1768,8 +1768,6 @@ extern cvar_t *r_anaglyphMode; extern cvar_t *r_mergeMultidraws; extern cvar_t *r_mergeLeafSurfaces; -extern cvar_t *r_softOverbright; - extern cvar_t *r_hdr; extern cvar_t *r_floatLightmap; extern cvar_t *r_postProcess; diff --git a/src/renderergl2/tr_shade.c b/src/renderergl2/tr_shade.c index 09a8e6e4..7d22944d 100644 --- a/src/renderergl2/tr_shade.c +++ b/src/renderergl2/tr_shade.c @@ -603,7 +603,7 @@ static void ComputeShaderColors( shaderStage_t *pStage, vec4_t baseColor, vec4_t } // multiply color by overbrightbits if this isn't a blend - if (r_softOverbright->integer && tr.overbrightBits + if (tr.overbrightBits && !((blend & GLS_SRCBLEND_BITS) == GLS_SRCBLEND_DST_COLOR) && !((blend & GLS_SRCBLEND_BITS) == GLS_SRCBLEND_ONE_MINUS_DST_COLOR) && !((blend & GLS_DSTBLEND_BITS) == GLS_DSTBLEND_SRC_COLOR) diff --git a/src/renderergl2/tr_sky.c b/src/renderergl2/tr_sky.c index 291bd7fb..df6f3798 100644 --- a/src/renderergl2/tr_sky.c +++ b/src/renderergl2/tr_sky.c @@ -450,7 +450,7 @@ static void DrawSkySide( struct image_s *image, const int mins[2], const int max color[0] = color[1] = - color[2] = (r_softOverbright->integer ? 1.0 : tr.identityLight) * backEnd.refdef.colorScale; + color[2] = backEnd.refdef.colorScale; color[3] = 1.0f; GLSL_SetUniformVec4(sp, UNIFORM_BASECOLOR, color); |