light: don't discard near-black lightmaps in q2

This commit is contained in:
Eric Wasylishen 2017-10-03 18:16:28 -06:00
parent 873e0b8a35
commit 41527a1c39
1 changed files with 5 additions and 3 deletions

View File

@ -2597,9 +2597,11 @@ WriteLightmaps(const mbsp_t *bsp, bsp2_dface_t *face, facesup_t *facesup, const
continue;
// skip lightmaps where all samples have brightness below 1
const float maxb = Lightmap_MaxBrightness(&lightmap, lightsurf);
if (maxb < 1)
continue;
if (bsp->loadversion != Q2_BSPVERSION) { // HACK: don't do this on Q2. seems if all styles are 0xff, the face is drawn fullbright instead of black (Q1)
const float maxb = Lightmap_MaxBrightness(&lightmap, lightsurf);
if (maxb < 1)
continue;
}
const float avgb = Lightmap_AvgBrightness(&lightmap, lightsurf);
sortable.push_back({ avgb, &lightmap });