This repository contains a number of modules, that makes 3D render using Vulkan API. All render moduls are implemented as static libraries and located in core directory, check READMEs in modules directories for more detailed information. Tests are located in tests directory and implemented as executable applications, that demonstrate rendering functionality. Almost all build dependences could be cloning by clone script, for more build informations check requirements and build paragraphs.
Links to another readme:
From working directory:
- Pre build steps
- For clean
Ubuntu
you need install next libs:- For GLFW build:
sudo apt install libx11-dev sudo apt install libxrandr-dev sudo apt install libxinerama-dev sudo apt install libxcursor-dev sudo apt install libxi-dev sudo apt install mesa-common-dev
- Vulkan:
You can check
sudo apt install vulkan-tools sudo apt install libvulkan-dev sudo apt install vulkan-validationlayers-dev spirv-tools
Vulkan
withvulkaninfo
andvkcube
commands
- For GLFW build:
- Clone dependences:
- Linux:
./scripts/clone.sh
- Windows
./scripts/clone.bat
- Linux:
- For clean
- Compile shaders
- Linux:
./scripts/shaders_compile.sh
- Windows
./scripts/shaders_compile.bat
- Linux:
- Build:
Use
mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCUDA_RAY_TRACING=ON cmake --build . --config Release
CUDA_RAY_TRACING
flag for buildcudaRayTracing
module andtestCuda
test, make shure you have installedCUDA
, it is not installed with dependences byclone.py
script.
A number of dependences that could be cloning by clone script:
- stb - image loader
- tinygltf - gltf model loader
- tinyply - ply model loader
- vulkan headers - Vulkan header files
- ImGui - open GUI library
- glfw - window API, automatically builded by script
Also you need installed Vulkan API
and optional CUDA
.
At the moment, only deferred render (deferredGraphics
) has been implemented. It's a stand-alone module that can be replaced with another implementation of render. In the future, it is planned to implement a simpler forward rendering as modul. Current implementation requires around 1.5-2 Gb of device memory for initialization and supporting all functionality.
All renders, for example deferredGraphics
, cudaRayTracing
or imguiGraphics
, host by graphics manager (graphicsManager
), that creates and supports all necessary stuff. Manager and render moduls communicats by linker classes, all instance of render moduls must implement oun linker class inherited from the linker interface.
cudaRayTracing
is simpliest implementation of ray tracing, it has low perfomance. Possible in the future this modul will be improved. In current state it shows simultaneos CUDA
and Vulkan
work.
ImGui was integrated as graphics modul imguiGraphics
, and could be launched with other graphics modul. Generally speaking all graphics moduls could be launched simultaneosly, and show in different parts of window. Also, for example, two instance of graphics could be launched by single manager for multi-view presentation (testPos
).
Supported models formats: gltf, glb, ply.