Initialize stats before each meshing

master
Marc Gilleron 2019-04-23 23:35:43 +01:00
parent b627a5736d
commit 19329efaa6
1 changed files with 2 additions and 0 deletions

View File

@ -1280,6 +1280,8 @@ Ref<ArrayMesh> VoxelMesherDMC::build_mesh(const VoxelBuffer &voxels) {
// - Gradients must be precalculated // - Gradients must be precalculated
// - The non-padded area size is cubic and power of two // - The non-padded area size is cubic and power of two
_stats = { 0 };
int padding = 1; int padding = 1;
const Vector3i buffer_size = voxels.get_size(); const Vector3i buffer_size = voxels.get_size();
// Taking previous power of two because the algorithm uses an integer cubic octree, and data should be padded // Taking previous power of two because the algorithm uses an integer cubic octree, and data should be padded