Fix material assignments being shifted if one of the surfaces has no vertex
parent
13e909fb0d
commit
f59b34f1a0
|
@ -388,6 +388,10 @@ void VoxelMesherBlocky::build(VoxelMesher::Output &output, const VoxelBuffer &bu
|
|||
}
|
||||
|
||||
output.surfaces.push_back(mesh_arrays);
|
||||
|
||||
} else {
|
||||
// Empty
|
||||
output.surfaces.push_back(Array());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ class VoxelMesher : public Reference {
|
|||
GDCLASS(VoxelMesher, Reference)
|
||||
public:
|
||||
struct Output {
|
||||
// Each surface correspond to a different material
|
||||
Vector<Array> surfaces;
|
||||
Mesh::PrimitiveType primitive_type;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue