From 76995fb2fac3a542a86255f54bb910944421e7b0 Mon Sep 17 00:00:00 2001 From: divverent Date: Thu, 27 Aug 2009 12:19:28 +0000 Subject: [PATCH] re-enable saturation on sidebyside and stereobuffer (it's harmless there), only keep it disabled in colormasked stereo git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9149 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_screen.c | 7 ++++++- cl_screen.h | 1 + gl_rmain.c | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cl_screen.c b/cl_screen.c index 631ace7f..c3c10953 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -1947,9 +1947,14 @@ void SCR_UpdateLoadingScreen (qboolean clear) key_consoleactive = old_key_consoleactive; } +qboolean R_Stereo_ColorMasking(void) +{ + return r_stereo_redblue.integer || r_stereo_redgreen.integer || r_stereo_redcyan.integer; +} + qboolean R_Stereo_Active(void) { - return (vid.stereobuffer || r_stereo_redblue.integer || r_stereo_redgreen.integer || r_stereo_redcyan.integer || r_stereo_sidebyside.integer); + return (vid.stereobuffer || r_stereo_sidebyside.integer || R_Stereo_ColorMasking()); } extern cvar_t cl_minfps; diff --git a/cl_screen.h b/cl_screen.h index df92c5a5..cc6bda0a 100644 --- a/cl_screen.h +++ b/cl_screen.h @@ -20,6 +20,7 @@ void CL_Screen_Shutdown(void); void CL_UpdateScreen(void); qboolean R_Stereo_Active(void); +qboolean R_Stereo_ColorMasking(void); #endif diff --git a/gl_rmain.c b/gl_rmain.c index e9521547..e9cdf7a6 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -3356,7 +3356,7 @@ void R_Bloom_StartFrame(void) Cvar_SetValueQuick(&r_damageblur, 0); } - if (!(r_glsl.integer && (r_glsl_postprocess.integer || (!R_Stereo_Active() && r_glsl_saturation.value != 1) || (v_glslgamma.integer && !vid_gammatables_trivial))) && !r_bloom.integer && !r_hdr.integer && (R_Stereo_Active() || (r_motionblur.value <= 0 && r_damageblur.value <= 0))) + if (!(r_glsl.integer && (r_glsl_postprocess.integer || (!R_Stereo_ColorMasking() && r_glsl_saturation.value != 1) || (v_glslgamma.integer && !vid_gammatables_trivial))) && !r_bloom.integer && !r_hdr.integer && (R_Stereo_Active() || (r_motionblur.value <= 0 && r_damageblur.value <= 0))) screentexturewidth = screentextureheight = 0; if (!r_hdr.integer && !r_bloom.integer) bloomtexturewidth = bloomtextureheight = 0; @@ -3679,7 +3679,7 @@ static void R_BlendView(void) | (r_refdef.viewblend[3] > 0 ? SHADERPERMUTATION_VERTEXTEXTUREBLEND : 0) | ((v_glslgamma.value && !vid_gammatables_trivial) ? SHADERPERMUTATION_GAMMARAMPS : 0) | (r_glsl_postprocess.integer ? SHADERPERMUTATION_POSTPROCESSING : 0) - | ((!R_Stereo_Active() && r_glsl_saturation.value != 1) ? SHADERPERMUTATION_SATURATION : 0); + | ((!R_Stereo_ColorMasking() && r_glsl_saturation.value != 1) ? SHADERPERMUTATION_SATURATION : 0); if (r_bloomstate.texture_bloom && !r_bloomstate.hdr) { -- 2.39.2