A recursive screen-space algorithm to render SDFs. This technique is most suitable for CPU rendering.
There is prior work in cone marching using multiple rendering passes on GPUs.
Press the numbers 1, 2, 3, 4 on your keyboard to toggle between 4 different raymarching algorithms:
- Standard ray marching
- Accelerated raymarching with over-relaxation (Balint & Valasek 2018)
- Adaptive ray batch marching (ARBM)
- ARBM with approximate/interpolated shading
Press the space bar to start/stop the rotation.
cargo run --release
Dependencies:
- The Rust toolchain
- The SDL2 libraries
Install the Rust toolchain:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shInstall the SDL2 package:
brew install sdl2Add this to your ~/.zprofile:
export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib"Install the Rust toolchain:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shInstall the SDL2 package:
sudo apt-get install libsdl2-devFollow the Windows-specific instructions to install the Rust toolchain.
Get SDL2.dll from one of SDL2 Releases.
Copy SDL2.dll (unzip) to the vm/ folder.