From: divverent Date: Tue, 8 Nov 2011 11:29:06 +0000 (+0000) Subject: sRGB fallback: properly convert r_hdr_scenebrightness X-Git-Tag: xonotic-v0.6.0~163^2~24 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=49e776b0904b0295eb12acf81343cf84c5739519;p=xonotic%2Fdarkplaces.git sRGB fallback: properly convert r_hdr_scenebrightness git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11535 d7cf8633-e32d-0410-b094-e92efae38249 --- 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();