256^3 rendering at 15FPS WITHOUT THE TRAVERSAL ALGORITHM! This thing's gonna FLY!

This commit is contained in:
MitchellHansen
2017-10-12 00:15:56 -07:00
parent b9c1bef7bc
commit 77e283a4ce
4 changed files with 17 additions and 15 deletions

View File

@@ -37,7 +37,7 @@ bool Application::init_clcaster() {
// Init the raycaster with a specified dimension and a pointer to the source
// array style data
octree = std::make_shared<Map>(128, map.get());
octree = std::make_shared<Map>(256, map.get());
raycaster->assign_octree(octree);

View File

@@ -706,7 +706,11 @@ bool CLCaster::compile_kernel(std::string kernel_source, bool is_path, std::stri
// Try and build the program
// "-cl-finite-math-only -cl-fast-relaxed-math -cl-unsafe-math-optimizations"
error = clBuildProgram(program, 1, &device_id, "-cl-finite-math-only -cl-fast-relaxed-math -cl-unsafe-math-optimizations", NULL, NULL);
// need a ref to the oct dimensions
//std::string oct_dimensions = std::to_string(map->getDimensions().x);
std::string build_string = "-DOCTDIM=256 -cl-finite-math-only -cl-fast-relaxed-math -cl-unsafe-math-optimizations";
error = clBuildProgram(program, 1, &device_id, build_string.c_str(), NULL, NULL);
// Check to see if it error'd out
if (cl_assert(error)) {

View File

@@ -245,9 +245,6 @@ std::tuple<uint64_t, uint64_t> Octree::GenerationRecursion(char* data, sf::Vecto
descriptor_position_array.push_back(child);
}
}
if (voxel_scale == 64)
std::cout << "WHoA";
// We are working bottom up so we need to subtract from the stack position
// the amount of elements we want to use. In the worst case this will be