Experimental real-time hybrid renderer for triangular geometry and SDF rendering made with C++ and Vulkan
The main motivation of the project is to render triangular geometry and Signed Distance Functions (SDFs) with a unified lighting system, supported by hardware-accelerated ray tracing.
Captured from the fractal_flythrough example.
Apollonian fractal by iq, FA-59A Mako spaceship model by hefturush and Village Cloudy Sky Dome HDRI from hdri-haven.
- Hybrid rendering using a mixture of rasterization, ray tracing, ray marching and compute shaders
- Deferred rendering
- PBR
- Ray marched SDF rendering
- Ray marched & ray-traced hard shadows
- Ray marched soft shadows
- Ray marched & ray-traced specular reflections
- HDRI skybox
- Post-processing
- (WIP) Ray marched & ray-traced glossy reflections from screen-space roughness
Hardware:
A GPU with hardware ray tracing support is required.
Operating systems:
Currently only tested on Windows.
- Vulkan SDK (Installation required)
- TGA
- GLFW
- GLM
- stb single-file public domain libraries
- tinyobjloader
- Install Vulkan SDK.
- Clone the repository with its dependencies using
git clone --recursive https://github.com/alpcihan/hybrid
. - Use CMake to build the project.
You can find example projects under the examples folder.
- Set the CMake variable
HYBRID_EXAMPLES_ENABLED
toON
to build the examples and download the associated assets. Note: it isON
by default.
An example demo comprising a static fractal and a user-controllable spaceship model navigating in a 3rd person view within an abstract environment. The spaceship is rendered using rasterization, while the fractal is rendered using ray marching.
Controls:
- W, A, S, D, Shift, and Space to move the spaceship.
- Up, Down, Left, Right to rotate the spaceship.
The project is licensed under MIT license.