Skip to content

Sirtsu55/VulraySamples

Repository files navigation

VulraySamples

Collection of samples for Vulray

This repository contains a collection of samples on how to use the Vulray raytracing library https://github.com/Sirtsu55/Vulray. The Samples are heavily commented to help understand what is going on. The samples inherit from a base Application class, that creates a window, presents an image to the screen and creates a Vulkan device, and Instance using Vulray's Vulkan builder. It also has protected members that the sample apllications can use in their code. Check Apllication.h to see what is declared there and Apllication.cpp for implementation.

Building

  • Meet the requirements of Vulray
  • Tested with CMake 3.25
  • C++ 20 compiler

Samples Structure

  • Base Directory: Helper classes and functions

  • Shaders Directory: All the shaders

  • Assets Directory: GLB 3D model files

  • Points of Intrest are marked by [POI] in the Samples

  • Move Freely in the scene using WASD and rotate camera by left-click + mouse and roll camera by Q-E

Samples Overview

Sample Description
HelloTriangle Simple triangle, with barycentric colors
DynamicTLAS Moving triangles by updating TLAS every frame with different instance transforms
DynamicBLAS Transforming the scale of a triangle BLAS every frame by updating it's vertex positions
BoxIntersections Custom AABB box intersection with custom intersection shader and AABB BLAS primitives
Compaction Using compaction to compact the BLAS, which significantly reduces the memory footprint. Almost half of the original required size
Callable Using callable shaders to shade our triangles uniquely
Mesh Materials This sample demonstrates how to organize geometries of a real scene into BLASses by loading a GLB scene and creating a BLAS for every mesh in the scene. Furthermore, uploads the material properties to the GPU and shades the geometries using their base color; no lighting yet.
Shading This sample shows how to implement Lambertian diffuse shading and implements color accumulation to reduce noise over still frames. This sample is mainly about shader code. So look at the shaders used in this sample.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published