Vulkan 3D renderer is built on Vulkan API
But there will be more graphics backend such as OpenGL and DirectX 12
There are only C and C++ interface headers for now.
Vulkan SDK
MINGW 11.2.0 (tested on this, but might also work with previous versions), you can check if it is already installed in your machine by running
$gcc --version
OR
$g++ --version
If this isn’t already installed, run the following in MSYS2 MinGW shell
$pacman -S gcc
GNU Make 4.3, you can check if it is already installed, though it already comes with mingw64 binutils package, by running
$ make --version
If this isn’t already installed, run the following in MSYS2 MinGW shell
$ pacman -S make
Git version 2.35.1, git must be installed in your machine, you can check if it is already installed by running
$ git --version
If this isn’t already installed, run the following in MSYS2 MinGW shell
$ pacman -S git
glslc, glslc can be installed as follows, run the following in MSYS2 MinGW shell
$ pacman -S mingw-w64-x86_64-shaderc
Vulkan Tools
$ sudo apt-get install vulkan-tools
Vulkan SDK
tar -xvf <archive name>
1.x.x.x
source ./setup-env.sh
sudo apt-get install vulkan-sdk
GCC 11.2.0 (tested on this, but might also work with previous versions), you can check if it is already installed in your machine by running
$ gcc --version
OR
$ g++ --version
If this isn’t already installed, run the following in the terminal
$ sudo apt-get install gcc
You might also need to install build-essentials
in case you encounter any standar library header inclusion errors:
$ sudo apt-get update
$ sudo apt-get install build-essentials
GNU Make 4.3, you can check if it is already installed, though it already comes with mingw64 binutils package, by running
$ make --version
If this isn’t already installed, run the following in the terminal
$ sudo apt-get install make
Git version 2.35.1, git must be installed in your machine, you can check if it is already installed by running
$ git --version
If this isn’t already installed, run the following in the terminal
$ sudo apt-get install git
$ sudo apt-get install libshaderc-dev
$ sudo apt-get install libgl-dev
$ sudo apt-get install spirv-tools
$ sudo apt-get install libvulkan-dev
$ sudo apt-get install libz-dev
$ sudo apt-get install libpng-dev
$ sudo apt-get install libbrotli-dev
$ sudo apt-get install libwayland-dev
Currently you can’t build the codebase in FreeBSD environment. There are many issues right now. For now, you would need to do the following:
pkg install gmake # for GNU make
pkg install shaderc # for shaderc libraries and glslc
pkg install pkgconf # for pkg-config
apt install cmake
pacman -S cmake
pkg install cmake
Clone the repository by running the following command
$git clone https://github.com/ravi688/VulkanRenderer.git
Change the working directory to VulkanRenderer
and setup all the dependency git submodules by running the following command
$cd VulkanRenderer
$make -s setup
Start building by running the following command
$make -s build
OR
$make -s build-debug
For release mode
$make -s build-release
Change the working directory to VulkanRenderer
and build the main
executable by running the following command
$make -s debug
Now run the main
executable by running the following command
$./main
There are several tests which you can try running by just passing arguments:
$cd <build directory>
$./main CUBE
The above set of commands would launch a window in which a white cube will be spinning. If you want to see all the possible test cases, you may launch the execution without any arguments and it would just print the list of possible test cases:
$./main
supported tests:
DEPTH_RENDER_TEXTURE
DEPTH_RENDER_TEXTURE_LOAD
ENVIRONMENT_REFLECTIONS
ENVIRONMENT_REFLECTIONS_LOAD
DEPTH_CUBE_RENDER_TEXTURE
DEPTH_CUBE_RENDER_TEXTURE_LOAD
POINT_LIGHT_SHADOWS
POINT_LIGHT_SHADOWS_LOAD
SPOT_LIGHT
SPOT_LIGHT_LOAD
CUBE
TEXTURE_SAMPLING
TEXTURE_SAMPLING_ALPHA_CHANNEL
TEXT_MESH
BITMAP_TEXT
TID_14_CASE_1
TID_14_CASE_2
TID_14_CASE_3
TID_28_CASE_1
TID_28_CASE_2
TID_28_CASE_3
TID_28_CASE_4
TID_42_CASE_1
TID_43_CASE_1
TID_43_CASE_2
TID_43_CASE_3
TID_43_CASE_4
TID_48_CASE_1
TID_48_CASE_2
TID_48_CASE_3
TID_48_CASE_4
TID_48_CASE_5
Change the working directory to VulkanRenderer
and run the following command
$make -s clean
$ cd sutk
$ ./setup_lunasvg.sh
$ make -s build-debug -j6
$ cd sutk
$ chmod +x ./setup_lunasvg.sh
$ sudo ./setup_lunasvg.sh
$ make -s build-debug -j6
Background Render Queue
Geometry Render Queue
Overlay Render Queue
General Purpose Render Queues
A camera can render its depth and color output to a user supplied textures - both at the same time.
Depth Render Texture
One can redirect the depth render output of a camera to a depth render texture
Color Render Texture
One can redirect the color render output of a camrea to a color render texture
Depth Cube Render Texture (Shadow map for point lights)
One can redirect the depth render output of 360 view (6 faces of a cube) to a cube depth render texture - which can further be used as a shadow map for point lights.
Color Cube Render Texture (Environment map for reflection effects)
One can redirect the color render output of 360 view (6 faces of a cube) to a cube color render texture - which can further be used as a environment reflection map.
Normal Map
Albedo Map
Skybox & Reflection cubemap
Multiple Cameras
Render Target switching
Directional lights
Point lights
Spot lights
Support for ASCII STL, BINARY STL
Support for ASCII OBJ
Mesh Trangulation and Quadrangulation
Tangent Vector Generation
Glyph pool to avoid glyph mesh duplication
High performance internal data structure to frequently update the text data
Text Mesh batching
Multiple Render passes and Subpasses (fully control over the input and output attachments)
Custom attachments configuration
Fixed Function pipeline configuration for each pass
The full documentation will be available very soon, however, for now you can have a look at the Wiki.