git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4867 fc73d0e0-1445-4013-8a0c-d673dee63da5

This commit is contained in:
Spoike 2015-04-27 12:55:48 +00:00
parent 56b8f125a1
commit 5ecd9cc5dd
1 changed files with 7 additions and 3 deletions

View File

@ -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);