Fix used channels when copying data for meshing

master
Marc Gilleron 2021-04-06 21:59:36 +01:00
parent 1448c5ea61
commit c746031eba
1 changed files with 2 additions and 2 deletions

View File

@ -817,8 +817,8 @@ static void copy_block_and_neighbors(const FixedArray<Ref<VoxelBuffer>, Cube::MO
{
RWLockRead read(src->get_lock());
for (unsigned int ci = 0; ci < channels.size(); ++ci) {
dst.copy_from(**src, src_min, src_max, dst_min, ci);
for (unsigned int ci = 0; ci < channels_count; ++ci) {
dst.copy_from(**src, src_min, src_max, dst_min, channels[ci]);
}
}
}