]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
properly check for bloom being active
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 6 Apr 2012 18:20:32 +0000 (18:20 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 6 Apr 2012 18:19:56 +0000 (20:19 +0200)
From: Rudolf Polzer <divverent@alientrap.org>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11789 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=d1f1b8d6ee3ee5aa6e5688852aa904a67bc7710a

gl_rmain.c

index 52fd013a71e3bd023f6a9eba0bc4acc5d4c3a3b5..fc3a88446c464d3399dc5a506b8b7b829f8d9142 100644 (file)
@@ -6910,10 +6910,6 @@ void R_RenderView(void)
 
        r_refdef.view.colorscale = r_hdr_scenebrightness.value * r_hdr_irisadaptation_value.value;
 
-       // apply bloom brightness offset
-       if(r_bloom.integer)
-               r_refdef.view.colorscale *= r_bloom_scenebrightness.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
@@ -6924,6 +6920,11 @@ void R_RenderView(void)
        R_Shadow_UpdateWorldLightSelection();
 
        R_Bloom_StartFrame();
+
+       // apply bloom brightness offset
+       if(r_fb.bloomtexture[0])
+               r_refdef.view.colorscale *= r_bloom_scenebrightness.value;
+
        R_Water_StartFrame();
 
        // now we probably have an fbo to render into