Skip to content

Commit

Permalink
bspinfo: fix not clearing between styles
Browse files Browse the repository at this point in the history
from @Paril
  • Loading branch information
ericwa committed Nov 25, 2024
1 parent dfa164f commit 638076f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions common/bspinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,9 @@ full_atlas_t build_lightmap_atlas(const mbsp_t &bsp, const bspxentries_t &bspx,
// copy out the atlas texture
result.style_to_lightmap_atlas[i] = full_atlas;

if (!full_atlas.rgba8_samples.empty())
memset(full_atlas.rgba8_samples.data(), 0, full_atlas.rgba8_samples.size());
std::fill(full_atlas.rgba8_samples.begin(), full_atlas.rgba8_samples.end(), qvec4b{});

if (!full_atlas.e5brg9_samples.empty())
memset(full_atlas.e5brg9_samples.data(), 0, full_atlas.e5brg9_samples.size() * 4);
std::fill(full_atlas.e5brg9_samples.begin(), full_atlas.e5brg9_samples.end(), uint32_t{});
}

auto ExportLightmapUVs = [&full_atlas, &result](const mbsp_t *bsp, const face_rect &face) {
Expand Down

0 comments on commit 638076f

Please sign in to comment.