From 49e776b0904b0295eb12acf81343cf84c5739519 Mon Sep 17 00:00:00 2001 From: divverent Date: Tue, 8 Nov 2011 11:29:06 +0000 Subject: [PATCH] sRGB fallback: properly convert r_hdr_scenebrightness git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11535 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gl_rmain.c b/gl_rmain.c index cdcadf37..8e9817ef 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -6867,6 +6867,11 @@ void R_RenderView(void) r_refdef.view.colorscale = r_hdr_scenebrightness.value * r_hdr_irisadaptation_value.value; + if(vid_sRGB.integer && vid_sRGB_fallback.integer && !vid.sRGB3D) + // in sRGB fallback, behave similar to true sRGB: convert this + // value from linear to sRGB + r_refdef.view.colorscale = Image_sRGBFloatFromLinearFloat(r_refdef.view.colorscale); + R_RenderView_UpdateViewVectors(); R_Shadow_UpdateWorldLightSelection(); -- 2.39.2