Rayex is a framework for cross-platform, cross-vendor, real-time path tracing in Vulkan. It runs on both Linux and Windows and is implemented using the new Khronos Vulkan ray tracing extension. Additionally, rayex uses SDL2 for windowing and glm as its math library. The framework also features native Dear ImGui support enabling the user to create graphical user interfaces without writing any API-related code.
Rayex is still in development, so documentation and examples might not always be up to date or complete.
General:
- Download compatible drivers for NVIDIA or AMD if not already installed
C++20
has to be enabled for the target (see CMakeLists.txt)VulkanSDK
(1.2.162.1 or higher)
Linux:
- Install
SDL2
with package manager
Windows:
- Microsoft Visual C++ Redistributable for Visual Studio 2019
To integrate rayex in an existing C++ / CMake project, please follow the steps below. Alternatively, build rayex yourself.
-
Download pre-built binaries for your system and place them inside your project (assuming
myProject/external/rayex
). -
Inside your project's CMakeLists.txt:
- Include "include/CMakeLists.txt"
include(${PROJECT_SOURCE_DIR}/external/rayex/include/CMakeLists.txt)
- Include all rayex headers
target_include_directories(example PRIVATE ${RAYEX_INCLUDE_DIRS})
- Inform CMake about the location of rayex and all third party libraries
target_link_directories(example PRIVATE ${RAYEX_LINK_DIRS})
- Link your target against rayex and all third party libraries
target_link_libraries(example ${RAYEX_LIBRARIES})
Alternatively, build rayex yourself:
$ git clone https://github.com/chillpert/rayex --recursive
$ cd rayex
$ mkdir build && cd build
$ cmake ..
$ make
Note: On Windows open the Visual Studio solution file (.sln) in the build directory and compile instead of $ make
.
The following code snippet shows how to render a single mesh. For a proper example, take a look at the documentation and at the official examples-repository for rayex.
#include "Rayex.hpp"
int main( )
{
// Initialize the renderer.
rx::Rayex renderer;
renderer.init( );
// Load some geometry and submit it to rayex.
auto cube = rx::loadObj( "cube.obj" );
renderer.scene( ).submitGeometry( cube );
// Create an instance of the geometry from above and submit it for rendering.
auto cubeInstance = rx::instance( cube );
renderer.scene( ).submitGeometryInstance( cubeInstance );
// The main loop.
while ( renderer.isRunning( ) )
{
renderer.run( );
}
}
A documentation of all classes and functions can be found here.
- Fix hardware evaluation (in VkCore)
- Crashes again when GUI disabled
- Do a complete C++ guidelines check
- Test Windows build
- Remove unncessary includes (especially in PCH)
- Provide new binaries for all platforms
- Enable all warnings for rayex and disable all warnings for third party
- Test rayex deploy with only headers and libs again
- Remove any paths set at compile time
- Remove big examples and put it in separate repo (combined with )
- Consider decreasing project size
- Fix camera reset when moving mouse after loading a scene
- SDL2main is unnecessary - remove it
- Set up a tool chain that automatically converts any texture to a ktx format of any given model (using toktx, from PNG) - OR - remove ktx and try to use STB image only
- figure out why everything needs be linked twice
- fix validation errors on latest Vulkan SDK
- Use rasterization for primary rays
- Improve documentation (especially requirements for model loading)
- Improved acceleration structure handling with optional performance tweaks
- Implement stochastic level of detail
- Multiple importance sampling
- HDR skymaps and skyboxes as light sources
- Denoising
- Add area light sampling for next event estimation