-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc/refactor: restructure project (#16)
* Refactor project structure * Update artifact path * Fix wrong include path * Fix shader path * Update CI and README * Rename workflow * Update README.md
- Loading branch information
Showing
56 changed files
with
19,805 additions
and
19,733 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
# VulkanSplatting | ||
VulkanSplatting is an (not-yet-highly-) optimized, cross-platform implementation of [Gaussian Splatting](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/) using the [Vulkan API](https://www.khronos.org/vulkan/) and compute pipelines. | ||
|
||
VulkanSplatting is an (not-yet-) highly optimized, cross-platform implementation | ||
of [Gaussian Splatting](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/) using | ||
the [Vulkan API](https://www.khronos.org/vulkan/) and compute pipelines. | ||
|
||
Why Vulkan? We want to democratize the access to high-performance point-based radiance fields. | ||
Existing implementations of Gaussian Splatting are often limited to CUDA, which only runs on NVIDIA GPUs, | ||
and OpenGL is deprecated on Apple platforms. Additionally, Vulkan's compute capabilities are the closest to CUDA's | ||
with support for warp-level primitives (subgroups). | ||
|
||
[](https://github.com/shg8/VulkanSplatting/actions/workflows/cmake-multi-platform.yml) | ||
|
||
 | ||
|
||
## Command Line Usage | ||
|
||
``` | ||
./vulkan_splatting [options] <input_file.ply> | ||
``` | ||
|
@@ -20,29 +29,42 @@ VulkanSplatting is an (not-yet-highly-) optimized, cross-platform implementation | |
|
||
- `-i`, `--immediate-swapchain`: Set swapchain mode to immediate (VK_PRESENT_MODE_IMMEDIATE_KHR) | ||
|
||
- `-w`, `--width <width>`: Set window width | ||
|
||
- `-h`, `--height <height>`: Set window height | ||
|
||
- `--no-gui`: Disable GUI | ||
|
||
## Building | ||
|
||
### Linux | ||
|
||
VulkanSplatting requires the following dependencies: | ||
|
||
`Vulkan headers, Vulkan validation layers, glslangValidator, glfw, glm` | ||
|
||
The easiest way to install the first three is through the [LunarG Vulkan SDK](https://www.lunarg.com/vulkan-sdk/). Alternatively, you can install the corresponding packages from your distro. For Ubuntu, the packages to install are `vulkan-headers, vulkan-validationlayers, glslang-dev, libglfw3-dev, libglm-dev`. | ||
The easiest way to install the first three is through the [LunarG Vulkan SDK](https://www.lunarg.com/vulkan-sdk/). | ||
Alternatively, you can install the corresponding packages from your distro. For Ubuntu, the packages to install | ||
are `vulkan-headers, vulkan-validationlayers, glslang-dev, libglfw3-dev, libglm-dev`. | ||
|
||
### Windows | ||
After installing Vulkan SDK, set the `VULKAN_SDK` environmental variable to the install path. Alternatively, pass `-DVULKAN_SDK=\INSTALL\LOCATION\OF\YOUR\SDK` to CMake when configuring. | ||
|
||
After installing Vulkan SDK, set the `VULKAN_SDK` environmental variable to the install path. Alternatively, | ||
pass `-DVULKAN_SDK=\INSTALL\LOCATION\OF\YOUR\SDK` to CMake when configuring. | ||
|
||
A full CMake configure command is as follows: | ||
|
||
``` | ||
mkdir .\VulkanSplatting\build | ||
cmake -DCMAKE_BUILD_TYPE=Release -DVULKAN_SDK=\INSTALL\LOCATION\OF\YOUR\SDK -S .\VulkanSplatting -B .\VulkanSplatting\build | ||
``` | ||
|
||
### macOS | ||
|
||
After installing the Vulkan SDK, please proceed with CMake configuration and build steps as usual. | ||
|
||
## TODO | ||
|
||
- [x] Better controls and GUI on GLFW | ||
- [ ] Implement SOTA parallel radix sort | ||
- [ ] Use Vulkan subgroups to batch Gaussian retrievals at the warp level | ||
|
@@ -53,17 +75,24 @@ After installing the Vulkan SDK, please proceed with CMake configuration and bui | |
|
||
Please feel free to open an issue if you have any feature suggestions or are interested in contributing. | ||
|
||
## Contributing | ||
If you are interested in integrating your Gaussian Splatting variant, please open an issue or a pull request. | ||
VulkanSplatting's shaders follow the procedures outlined in the original paper, so it should be relatively | ||
easy to port your CUDA code. With cross-platform support, it's a great way to expand the reach and adoption of your research. | ||
If there are any questions, feel free to [send me an email](mailto:[email protected]). | ||
|
||
## License | ||
The project is licensed under LGPL. If that is not permissive enough for your project, please feel free to [send me an email](mailto:[email protected]). | ||
|
||
The main project is licensed under LGPL. | ||
|
||
This project uses several third-party libraries. Here is a list of these libraries along with their respective licenses: | ||
|
||
- **GLM**: Licensed under the [MIT License](https://opensource.org/licenses/MIT). | ||
- **args.hxx**: Licensed under the [MIT License](https://opensource.org/licenses/MIT). | ||
- **spdlog**: Licensed under the [MIT License](https://opensource.org/licenses/MIT). | ||
- **ImGUI**: Licensed under the [MIT License](https://opensource.org/licenses/MIT). | ||
- **Vulkan Memory Allocator**: Licensed under the [MIT License](https://opensource.org/licenses/MIT). | ||
- **VkRadixSort**: Licensed under the [MIT License](https://opensource.org/licenses/MIT). | ||
- **implot**: Licensed under the [MIT License](https://opensource.org/licenses/MIT). | ||
- **glfw**: Licensed under the [zlib/libpng license](https://www.glfw.org/license.html). | ||
- **libenvpp**: Licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). | ||
- **GLM**: [MIT License](https://opensource.org/licenses/MIT). | ||
- **args.hxx**: [MIT License](https://opensource.org/licenses/MIT). | ||
- **spdlog**: [MIT License](https://opensource.org/licenses/MIT). | ||
- **ImGUI**: [MIT License](https://opensource.org/licenses/MIT). | ||
- **Vulkan Memory Allocator**: [MIT License](https://opensource.org/licenses/MIT). | ||
- **VkRadixSort**: [MIT License](https://opensource.org/licenses/MIT). | ||
- **implot**: [MIT License](https://opensource.org/licenses/MIT). | ||
- **glfw**: [zlib/libpng license](https://www.glfw.org/license.html). | ||
- **libenvpp**: [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cmake_minimum_required(VERSION 3.26) | ||
|
||
add_subdirectory(viewer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cmake_minimum_required(VERSION 3.26) | ||
project(vulkan_splatting_viewer) | ||
|
||
add_executable(vulkan_splatting_viewer main.cpp) | ||
|
||
target_include_directories(vulkan_splatting_viewer PRIVATE third_party) | ||
|
||
target_link_libraries(vulkan_splatting_viewer PRIVATE | ||
libenvpp::libenvpp | ||
vulkan_splatting) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef VULKANSPLATTING_H | ||
#define VULKANSPLATTING_H | ||
|
||
#include <optional> | ||
#include <string> | ||
|
||
class VulkanSplatting { | ||
public: | ||
struct RendererConfiguration { | ||
bool enableVulkanValidationLayers = false; | ||
std::optional<uint8_t> physicalDeviceId = std::nullopt; | ||
bool immediateSwapchain = false; | ||
std::string scene; | ||
|
||
float fov = 45.0f; | ||
float near = 0.2f; | ||
float far = 1000.0f; | ||
bool enableGui = true; | ||
uint32_t width = 800; | ||
uint32_t height = 600; | ||
}; | ||
|
||
explicit VulkanSplatting(RendererConfiguration configuration) : configuration(configuration) {} | ||
|
||
void start() const; | ||
private: | ||
RendererConfiguration configuration; | ||
}; | ||
|
||
#endif //VULKANSPLATTING_H |
Oops, something went wrong.