glsl doesn't allow dividing by zero (result is undefined, although sane on nvidia...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 28 May 2007 13:35:07 +0000 (13:35 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 28 May 2007 13:35:07 +0000 (13:35 +0000)
commitcbf992aa69db144bffd4bd16d8339ba808fcaddc
tree971250a65b53bb513bb98ac67a74039babc59463
parentc6d887e0d9898650dc272ef8598cb5642ba568b0
glsl doesn't allow dividing by zero (result is undefined, although sane on nvidia), so...
-"      color.rgb = SceneBrightness / (ContrastBoostCoeff + 1 / color.rgb);\n"
+"      color.rgb = color.rgb * SceneBrightness / (ContrastBoostCoeff * color.rgb + 1);\n"
also gains some fps apparently (7600GT here)
Weirdly, *= seems to be by 3fps slower than using = and *

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7378 d7cf8633-e32d-0410-b094-e92efae38249
gl_rmain.c