Rapid Prototyping Framework for Open crossplatform development of Vulkan Hardware Ray tracing Demos.
Version: 1.0.7
Doxygen hosted on GH Pages (Based on master
branch)
- foray-examples: Examples demonstrating GBuffer, minimal raytracer, complex raytracer
- foray-denoising: Project demonstrating and comparing denoiser implementations: OptiX, ASVGF, BMFR (WIP)
- foray_restir: ReStir demo implementation
- Inherit from base types to get a very quick and easy start
- Includes integrated instance, device, window, swapchain setup
- Renderloop integration to manage application lifetime and event handling
- Builtin support for in flight frame rendering, may your GPU never be idle
- Utilise the support types manually for a fully customizable setup
- Hierarchical scene graph
- Transformations using glm math library
- Component system
- Default component implementations based on glTF format specifications
- The scenegraph is built by loading a glTF file
- glTFs base material system is well suited for physically based rendering (at the level possible in real time on GPUs). Our Implementation supports
KHR_materials_ior
,KHR_materials_transmission
andKHR_materials_volume
extensions to improve it further - Support for punctual and direction lights
KHR_lights_punctual
- glTFs base material system is well suited for physically based rendering (at the level possible in real time on GPUs). Our Implementation supports
- Multiple scenes can be merged into one
- Meshes will automatically generate a BLAS
- The scenegraph can build a TLAS based on the meshes referenced
- Material and Primitive buffer information is stored in a BLAS Instance
instanceCustomOffset
property - Runtime TLAS rebuilding for animated scene nodes
- Animate node transforms (translation, scale, rotation)
- Interpolate in steps, linearly and glTFs cubic splines
The GBuffer provides the basis for denoising
Position
: Fragment positions in WorldspaceNormals
: Fragment normals in Worldspace (includes normal mapping)Albedo
: Raw surface albedo valuesMotion
: Screenspace Fragment motion vectors (includes movement of animated objects). Each pixel projects back to its position in the previous frame in UV coordinates with subpixel accuracy.MaterialIdx
: Material index as defined by the material systemMeshInstanceIdx
: Mesh Instance Index as defined by the draw system. Every object gets a unique index.LinearZ
: Linear depth information and depth derivativeDepth
: Default Vulkan Depth output
- Very little code required for complex shader binding table setup
- Ability to set custom data for shader binding table entries
- Integration into a builder class for Ray tracing Pipeline
- Simple interface for integrating denoisers into custom render system *Extra handling required for externally synchronized denoisers such as OptiX
- VkBuffer wrapper
- VkImage wrapper
- DescriptorSet + Layout wrapper
- ... many more
- Vulkan QueryPool based for accurate device execution time benchmarking
- Included methods for printing benchmark results in a CSV compatible format or as a ImGui table
- Shader sources and included files are monitored for changes at runtime, shaders recompiled and reloaded.
- Shader compilation via glslc executable can be parameterized with additional include directories, macro definitions etc.
- SPIR-V binaries compiled are handled individually according to the glslc parameters used for compilation.
Get an overview of the code in the ./src/ directory
git submodule add https://github.com/Vulkemp/foray
git submodule init
git submodule update
add_subdirectory("foray")
# Link foray lib
target_link_libraries(
${PROJECT_NAME}
PUBLIC foray
)
# Windows requires SDL2 libs linked specifically
if (WIN32)
target_link_libraries(
${PROJECT_NAME}
PUBLIC ${SDL2_LIBRARIES}
)
endif()
# Configure include directories
target_include_directories(
${PROJECT_NAME}
PUBLIC "${CMAKE_SOURCE_DIR}/foray/src" # Foray includes
PUBLIC "${CMAKE_SOURCE_DIR}/foray/third_party" # Third Party includes
PUBLIC ${Vulkan_INCLUDE_DIR}
)
- Use the template from docs/template.md
- or copy an example from foray-examples
- GLM: GLSL-like mathematics library (MIT License)
- ImGui: Immediate Mode GUI for simple user interfaces (MIT License)
- NameOf: Compiler wizardry providing string representations of enum types etc. for debugging (MIT License)
- SDL2: Cross platform OS interface (ZLib License)
- spdlog: Formatted logging library (MIT License)
- tinyexr: Loading library for EXR high dynamic range image file format (Custom License)
- tinygltf: glTF loader library (MIT License)
- vk-bootstrap: Utility library for instance creation, device selection and building, queue selection and swapchain creation (MIT License)
- Vulkan Memory Allocator: Simplified Vulkan memory allocation (MIT License)
See changelog.md document on Github or Github Pages Doxygen Docs