[ioquake3] 19/33: OpenGL2: Fix brightness when r_autoExposure is disabled
Simon McVittie
smcv at debian.org
Mon Oct 30 14:00:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository ioquake3.
commit ac4802af8d431af0813f5def9dbb5190d8649639
Author: Zack Middleton <zack at cloemail.com>
Date: Mon Oct 2 20:23:16 2017 -0500
OpenGL2: Fix brightness when r_autoExposure is disabled
The game world is too dark when r_autoExposure is disabled. It can be
fixed by setting (cheat) r_cameraExposure to 1 but then the game is
too bright when r_autoExposure is enabled. So default r_cameraExposure
to 1 and make auto exposure subtract 1 from r_cameraExposure value.
---
code/renderergl2/tr_init.c | 2 +-
code/renderergl2/tr_postprocess.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/renderergl2/tr_init.c b/code/renderergl2/tr_init.c
index ea315e6..2a91d53 100644
--- a/code/renderergl2/tr_init.c
+++ b/code/renderergl2/tr_init.c
@@ -1218,7 +1218,7 @@ void R_Register( void )
r_forceAutoExposureMin = ri.Cvar_Get( "r_forceAutoExposureMin", "-2.0", CVAR_CHEAT );
r_forceAutoExposureMax = ri.Cvar_Get( "r_forceAutoExposureMax", "2.0", CVAR_CHEAT );
- r_cameraExposure = ri.Cvar_Get( "r_cameraExposure", "0", CVAR_CHEAT );
+ r_cameraExposure = ri.Cvar_Get( "r_cameraExposure", "1", CVAR_CHEAT );
r_depthPrepass = ri.Cvar_Get( "r_depthPrepass", "1", CVAR_ARCHIVE );
r_ssao = ri.Cvar_Get( "r_ssao", "0", CVAR_LATCH | CVAR_ARCHIVE );
diff --git a/code/renderergl2/tr_postprocess.c b/code/renderergl2/tr_postprocess.c
index ade9ebf..9931757 100644
--- a/code/renderergl2/tr_postprocess.c
+++ b/code/renderergl2/tr_postprocess.c
@@ -82,7 +82,7 @@ void RB_ToneMap(FBO_t *hdrFbo, ivec4_t hdrBox, FBO_t *ldrFbo, ivec4_t ldrBox, in
// tonemap
color[0] =
color[1] =
- color[2] = pow(2, r_cameraExposure->value); //exp2(r_cameraExposure->value);
+ color[2] = pow(2, r_cameraExposure->value - autoExposure); //exp2(r_cameraExposure->value);
color[3] = 1.0f;
if (autoExposure)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git
More information about the Pkg-games-commits
mailing list