Comments
parent
34653341cf
commit
cae44985a8
|
@ -3,6 +3,9 @@
|
|||
#include "transvoxel_tables.cpp"
|
||||
#include <core/os/os.h>
|
||||
|
||||
// This is a very partial implementation, it is barely equivalent to marching cubes.
|
||||
// It doesn't include transition cells.
|
||||
|
||||
namespace {
|
||||
|
||||
inline float tof(int8_t v) {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "../voxel_buffer.h"
|
||||
#include <core/resource.h>
|
||||
|
||||
// TODO Rename VoxelStream
|
||||
// Provides access to a source of paged voxel data.
|
||||
// Must be implemented in a multi-thread-safe way.
|
||||
class VoxelProvider : public Resource {
|
||||
|
|
|
@ -107,5 +107,6 @@ void VoxelProviderImage::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("get_channel"), &VoxelProviderImage::get_channel);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "Image"), "set_image", "get_image");
|
||||
// TODO Enum hint
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "channel"), "set_channel", "get_channel");
|
||||
}
|
||||
|
|
|
@ -29,6 +29,10 @@ VoxelBlock::~VoxelBlock() {
|
|||
}
|
||||
|
||||
void VoxelBlock::set_mesh(Ref<Mesh> mesh, Ref<World> world) {
|
||||
// TODO Don't add mesh instance to the world if it's not visible.
|
||||
// I suspect Godot is trying to include invisible mesh instances into the culling process,
|
||||
// which is killing performance when LOD is used (i.e many meshes are in pool but hidden)
|
||||
// This needs investigation.
|
||||
|
||||
VisualServer &vs = *VisualServer::get_singleton();
|
||||
|
||||
|
|
Loading…
Reference in New Issue