just use sample difference instead of trying to re-calculate it

This commit is contained in:
Jonathan 2022-07-10 13:47:08 -04:00
parent 2a70cafa32
commit a329c901c6
1 changed files with 3 additions and 5 deletions

View File

@ -169,9 +169,8 @@ static void MakeBounceLightsThread(const settings::worldspawn_keys &cfg, const m
return;
}
const vec_t sample_divisor = sqrt(area);
const vec_t extra_divisor = (options.extra.value() * options.extra.value());
const vec_t lmscale_divisor = (16.0 / surf.lightmapscale);
const vec_t area_divisor = sqrt(area);
const vec_t sample_divisor = surf.points.size() / (surf.vanilla_extents.width() * surf.vanilla_extents.height());
qplane3d faceplane = winding.plane();
@ -190,9 +189,8 @@ static void MakeBounceLightsThread(const settings::worldspawn_keys &cfg, const m
qvec3d total = {};
for (auto &styleColor : sum) {
styleColor.second /= area_divisor;
styleColor.second /= sample_divisor;
styleColor.second /= extra_divisor;
styleColor.second /= lmscale_divisor;
styleColor.second *= cfg.bouncescale.value();
total += styleColor.second;
}