Fast GPU Generation of Distance Fields from a Voxel Grid is a real-time voxel painting application built in Rust, designed to explore and optimize techniques for generating distance fields directly on the GPU. The project compares several existing algorithms and proposes a new optimized approach suitable for interactive applications.
Whether you're painting in voxels or pushing the limits of real-time computation, this project showcases how GPU acceleration can make complex field generation blazingly fast.
- Interactive voxel painting interface
- Real-time distance field generation using GPU shaders
- A comparison of multiple distance field algorithms in the report
- Optimized distance field generation pipeline for minimal latency
You can either download a prebuilt executable for your system or build it yourself from source.
Prebuilt executables are available on the Releases page for:
- Windows
- macOS
- Linux
If you prefer building yourself, a nightly version of rust is required for the following features:
generic_const_exprsduration_millis_floatmap_try_insertvariant_count
You will also require the shaderc tools to be installed, this can easily be acquired by installing the Vulkan SDK.
To build the project:
- Install Rust Nightly:
rustup install nightly
rustup default nightly- Clone the repository:
git clone https://github.com/Fedron/gpu-voxel-fields.git
cd gpu-voxel-fields/implementation- Run the application using Cargo:
cargo run --releaseThrough a comparison of existing distance field generation techniques, this project develops an optimized GPU-based method that achieves real-time performance, significantly outperforming naive approaches especially on larger voxel grids.
Key improvements:
- Reduction in computation time by 99% compared to a brute force approach
- Improved scalability to larger voxel volumes
Limitations:
- Large memory usage as memory representation and compression was not a focus of the paper
- Ray marcher computation time bottleneck at large voxel volumes
/implementation - Rust source code for the voxel painting application and distance field generation compute shader
/report - LaTeX source files for the full dissertation report, and a complete PDF
This project is licensed under the MIT License.

