diff --git a/src/gl/scene/gl_flats.cpp b/src/gl/scene/gl_flats.cpp index b5a5fc5c68..383ee15742 100644 --- a/src/gl/scene/gl_flats.cpp +++ b/src/gl/scene/gl_flats.cpp @@ -471,11 +471,9 @@ void GLFlat::Draw(int pass) } else { - if (foggy) gl_RenderState.EnableBrightmap(false); gltexture->Bind(); bool pushed = gl_SetPlaneTextureRotation(&plane, gltexture); DrawSubsectors(pass, true); - gl_RenderState.EnableBrightmap(true); if (pushed) { glPopMatrix(); diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 4b47abb1f8..d32432a289 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -405,7 +405,6 @@ void FGLRenderer::RenderScene(int recursion) gl_RenderState.EnableBrightmap(gl_fixedcolormap == CM_DEFAULT); gl_drawinfo->drawlists[GLDL_PLAIN].Sort(); gl_drawinfo->drawlists[GLDL_PLAIN].Draw(pass); - gl_RenderState.EnableBrightmap(false); gl_drawinfo->drawlists[GLDL_FOG].Sort(); gl_drawinfo->drawlists[GLDL_FOG].Draw(pass); gl_drawinfo->drawlists[GLDL_LIGHTFOG].Sort(); @@ -422,10 +421,8 @@ void FGLRenderer::RenderScene(int recursion) } if (pass == GLPASS_BASE) pass = GLPASS_BASE_MASKED; gl_RenderState.AlphaFunc(GL_GEQUAL,gl_mask_threshold); - gl_RenderState.EnableBrightmap(true); gl_drawinfo->drawlists[GLDL_MASKED].Sort(); gl_drawinfo->drawlists[GLDL_MASKED].Draw(pass); - gl_RenderState.EnableBrightmap(false); gl_drawinfo->drawlists[GLDL_FOGMASKED].Sort(); gl_drawinfo->drawlists[GLDL_FOGMASKED].Draw(pass); gl_drawinfo->drawlists[GLDL_LIGHTFOGMASKED].Sort(); diff --git a/src/gl/scene/gl_walls_draw.cpp b/src/gl/scene/gl_walls_draw.cpp index 9375491956..d3574ebe9e 100644 --- a/src/gl/scene/gl_walls_draw.cpp +++ b/src/gl/scene/gl_walls_draw.cpp @@ -461,7 +461,6 @@ void GLWall::RenderTranslucentWall() int extra; if (gltexture) { - if (flags&GLWF_FOGGY) gl_RenderState.EnableBrightmap(false); gl_RenderState.EnableGlow(!!(flags & GLWF_GLOW)); gltexture->Bind(flags, 0); extra = getExtraLight(); @@ -486,7 +485,6 @@ void GLWall::RenderTranslucentWall() { gl_RenderState.EnableTexture(true); } - gl_RenderState.EnableBrightmap(true); gl_RenderState.EnableGlow(false); } diff --git a/src/gl/shaders/gl_shader.cpp b/src/gl/shaders/gl_shader.cpp index 768d3ad53f..a132e65dda 100644 --- a/src/gl/shaders/gl_shader.cpp +++ b/src/gl/shaders/gl_shader.cpp @@ -393,10 +393,9 @@ FShader *FShaderContainer::Bind(int cm, bool glowing, float Speed, bool lights) glUniform3fv(sh->colormaprange_index, 1, m); } } - /* else { - bool desat = cm>=CM_DESAT1 && cm<=CM_DESAT31; + bool desat = false;// cm >= CM_DESAT1 && cm <= CM_DESAT31; sh = shader[glowing + 2*desat + 4*lights + (glset.lightmode & 8)]; // [BB] If there was a problem when loading the shader, sh is NULL here. if( sh ) @@ -404,11 +403,10 @@ FShader *FShaderContainer::Bind(int cm, bool glowing, float Speed, bool lights) sh->Bind(Speed); if (desat) { - glUniform1f(sh->desaturation_index, 1.f-float(cm-CM_DESAT0)/(CM_DESAT31-CM_DESAT0)); + //glUniform1f(sh->desaturation_index, 1.f-float(cm-CM_DESAT0)/(CM_DESAT31-CM_DESAT0)); } } } - */ return sh; }