]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
increase the accuracy of r_bloom_brighten a bit (or make high values work at all)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Oct 2009 10:00:47 +0000 (10:00 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Oct 2009 10:00:47 +0000 (10:00 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9329 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 993ac16662a9e124dfbcda9223ca2a53a4017501..9d3026b3b95f3479dc5e5477642e7330a24a2b06 100644 (file)
@@ -4073,8 +4073,9 @@ void R_Bloom_MakeTexture(void)
        brighten = r_bloom_brighten.value;
        if (r_hdr.integer)
                brighten *= r_hdr_range.value;
+       brighten = sqrt(brighten);
        if(range >= 1)
-               brighten *= pow((3 * range) / (2 * range - 1), 2); // compensate for the "dot particle"
+               brighten *= (3 * range) / (2 * range - 1); // compensate for the "dot particle"
        R_Mesh_TexBind(0, R_GetTexture(r_bloomstate.texture_bloom));
        R_Mesh_TexCoordPointer(0, 2, r_bloomstate.offsettexcoord2f, 0, 0);
 
@@ -4103,8 +4104,8 @@ void R_Bloom_MakeTexture(void)
                        // black at the edges
                        // (probably not realistic but looks good enough)
                        //r = ((range*range+1)/((float)(x*x+1)))/(range*2+1);
-                       //r = (dir ? 1.0f : brighten)/(range*2+1);
-                       r = (dir ? 1.0f : brighten) / (range * 2 + 1);
+                       //r = brighten/(range*2+1);
+                       r = brighten / (range * 2 + 1);
                        if(range >= 1)
                                r *= (1 - x*x/(float)(range*range));
                        GL_Color(r, r, r, 1);