summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_image.c
diff options
context:
space:
mode:
authorSmileTheory <SmileTheory@gmail.com>2014-02-20 17:01:50 -0800
committerTim Angus <tim@ngus.net>2014-06-17 17:43:40 +0100
commit24b32bee94af9c0a3dc5846bacc515b18df4a26d (patch)
treef194f1cbacc06ddedd1e71e15662c779aa3e1ccc /src/renderergl2/tr_image.c
parent900d6d1531811a4847fa1978e4914169ff7ff603 (diff)
OpenGL2: Remove and force r_softOverbright.
Diffstat (limited to 'src/renderergl2/tr_image.c')
-rw-r--r--src/renderergl2/tr_image.c41
1 files changed, 5 insertions, 36 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;
}