Octree works out to 128x128 as is, and performance seems very promising. Traversal or octree generation fixes will be next
This commit is contained in:
@@ -38,7 +38,7 @@ bool Application::init_clcaster() {
|
||||
// Send the data to the GPU
|
||||
raycaster->assign_map(map);
|
||||
|
||||
octree = std::make_shared<Map>(32, map.get());
|
||||
octree = std::make_shared<Map>(128, map.get());
|
||||
raycaster->assign_octree(octree);
|
||||
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@ Map::Map(uint32_t dimensions, Old_Map* array_map) {
|
||||
|
||||
// randomly set the voxel data for testing
|
||||
for (uint64_t i = 0; i < dimensions * dimensions * dimensions; i++) {
|
||||
if (rand() % 10000 < 3)
|
||||
voxel_data[i] = 1;
|
||||
else
|
||||
//if (rand() % 10000 < 3)
|
||||
// voxel_data[i] = 1;
|
||||
//else
|
||||
voxel_data[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
char* char_array = array_map->get_voxel_data();
|
||||
sf::Vector3i arr_dimensions = array_map->getDimensions();
|
||||
|
||||
Reference in New Issue
Block a user