From 5ecd9cc5dd27d9388418ca5fedf2b1f62e19bdb1 Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 27 Apr 2015 12:55:48 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4867 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_rlight.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/engine/gl/gl_rlight.c b/engine/gl/gl_rlight.c index 8dcd4ad9c..5d06b9cff 100644 --- a/engine/gl/gl_rlight.c +++ b/engine/gl/gl_rlight.c @@ -59,15 +59,19 @@ void R_UpdateHDR(vec3_t org) //fake and lame, but whatever. vec3_t ambient, diffuse, dir; float lev = 0; + +#ifdef RTLIGHTS + Sh_CalcPointLight(org, ambient); + lev += VectorLength(ambient); + + if (!r_shadow_realtime_world.ival || r_shadow_realtime_world_lightmaps.value) +#endif { cl.worldmodel->funcs.LightPointValues(cl.worldmodel, org, ambient, diffuse, dir); lev += (VectorLength(ambient) + VectorLength(diffuse))/256; } - Sh_CalcPointLight(org, ambient); - lev += VectorLength(ambient); - lev += 0.001; //no division by 0! lev = r_hdr_irisadaptation_multiplier.value / lev; lev = bound(r_hdr_irisadaptation_minvalue.value, lev, r_hdr_irisadaptation_maxvalue.value);