From: havoc Date: Fri, 1 Apr 2011 08:42:00 +0000 (+0000) Subject: make r_hdr behave like r_bloom when r_viewfbo is on X-Git-Tag: xonotic-v0.6.0~163^2~546 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=030a101c7bfaa41d53c608757817dadbb10205a3;p=xonotic%2Fdarkplaces.git make r_hdr behave like r_bloom when r_viewfbo is on git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11000 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 3e3910aa..6cbc83df 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -5888,10 +5888,10 @@ void R_Bloom_StartFrame(void) break; } - if (r_hdr.integer || r_bloom.integer) + if ((r_hdr.integer || r_bloom.integer) && r_bloomstate.bloomwidth) { r_bloomstate.enabled = true; - r_bloomstate.hdr = r_hdr.integer != 0; + r_bloomstate.hdr = r_hdr.integer != 0 && !r_bloomstate.fbo_framebuffer; } R_Viewport_InitOrtho(&r_bloomstate.viewport, &identitymatrix, r_refdef.view.x, vid.height - r_bloomstate.bloomheight - r_refdef.view.y, r_bloomstate.bloomwidth, r_bloomstate.bloomheight, 0, 0, 1, 1, -10, 100, NULL); @@ -5974,7 +5974,7 @@ void R_Bloom_MakeTexture(void) range = r_bloom_blur.integer * r_bloomstate.bloomwidth / 320; brighten = r_bloom_brighten.value; - if (r_hdr.integer) + if (r_bloomstate.hdr) brighten *= r_hdr_range.value; brighten = sqrt(brighten); if(range >= 1) @@ -6580,7 +6580,7 @@ void R_RenderView(void) r_refdef.view.clear = true; // this produces a bloom texture to be used in R_BlendView() later - if (r_hdr.integer && r_bloomstate.bloomwidth) + if (r_bloomstate.hdr) { R_HDR_RenderBloomTexture(); // we have to bump the texture frame again because r_refdef.view.colorscale is cached in the textures