Current state of the application: Chunks being generated based on a noise map and streamed to the GPU for drawing.
Real-time terrain generation in a 3D world from a procedural density field. CUDA kernels are responsible for evaluating the density field and extracting a mesh out of it via Marching Cubes, which then can be drawn by OpenGL.
-
Run workflow
cmake --workflow --preset <platform>-<type>
where
<platform>can be any ofgcc,clang, andwindowsand<type>can be eitherrelease, ordebug. -
Run the Application
./build/<type>/src/app/ProceduralGeneration
-
Configure CMake
cmake --preset <platform>-<type>
-
Build the Application
cmake --build --preset <platform>-<type>
-
Run the Application
./build/<type>/src/app/ProceduralGeneration
Please note: macOS does not support CUDA Please note: CUDA support has only been tested and verified by myself on a Linux system with CUDA Toolkit version 13.3, reliability and functionality on Windows may be lacking.D
If you want to use CUDA (NVIDIA GPUs only), you can pass the needed flags to CMake at configuration time like so:
cmake --preset <platform>-<type> -DPEN_ENABLE_CUDA=ON -DCMAKE_CUDA_HOST_COMPILER=<path_to_a_c++23_compatible_compiler>For example on Linux, use /usr/bin/clang++-19 for CMAKE_CUDA_HOST_COMPILER.
And afterward, build like normal:
cmake --build --preset <platform>-<type>CMake will then figure out where the nvcc compiler is and give it the proper settings.
- LearnOpenGL.com
- OpenGL Sphere by Song Ho Ahn (안성호)
- Polygonising a scalar field by Paul Bourke
- Marching Cubes with OpenGL by DKGR
First stage of the project: A torus with a lighting sphere in the center
Second stage of the project: Single chunk that is generated based on noise.


