From 41527a1c3954a110b784a20a8115f46b6cdd98ba Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Tue, 3 Oct 2017 18:16:28 -0600 Subject: [PATCH] light: don't discard near-black lightmaps in q2 --- light/ltface.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/light/ltface.cc b/light/ltface.cc index 7762f0c6..d0b58442 100644 --- a/light/ltface.cc +++ b/light/ltface.cc @@ -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 });