diff --git a/light/ltface.cc b/light/ltface.cc index 97b9c399..30c81678 100644 --- a/light/ltface.cc +++ b/light/ltface.cc @@ -2613,6 +2613,25 @@ IntegerDownsampleImage(const std::vector &input, int w, int h, int facto return res; } +static std::vector +HighlightSeams(const std::vector &input, int w, int h) +{ + std::vector res(input); + + for (int y=0; y BoxBlurImage(const std::vector &input, int w, int h, int radius) { @@ -2784,6 +2803,11 @@ WriteLightmaps(const mbsp_t *bsp, bsp2_dface_t *face, facesup_t *facesup, const // these are the actual output width*height, without oversampling. std::vector fullres = LightmapColorsToGLMVector(lightsurf, lm); + + if (debug_highlightseams) { + fullres = HighlightSeams(fullres, oversampled_width, oversampled_height); + } + if (softsamples > 0) { fullres = BoxBlurImage(fullres, oversampled_width, oversampled_height, softsamples); } @@ -2799,10 +2823,6 @@ WriteLightmaps(const mbsp_t *bsp, bsp2_dface_t *face, facesup_t *facesup, const qvec4f color = output_color.at(sampleindex); const qvec4f &direction = output_dir.at(sampleindex); - if (debug_highlightseams && color[3] == 0) { - color = qvec4f(255, 0, 0, 1); - } - *lit++ = color[0]; *lit++ = color[1]; *lit++ = color[2];