]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
sRGB fallback: properly convert r_hdr_scenebrightness
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 8 Nov 2011 11:29:06 +0000 (11:29 +0000)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 8 Nov 2011 11:30:06 +0000 (12:30 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11535 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=49e776b0904b0295eb12acf81343cf84c5739519

gl_rmain.c

index f3f65f6bfd927aecab99866956c424dc6306223e..a4011abd8fa26bc631307fbc02908ad49239065a 100644 (file)
@@ -6920,6 +6920,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();