Repository navigation
Releases: BCaven/OfflineRaytracingGPU
Release list
New traversal algorithms, fractals, performance benchmarks
This release contains many new features:
- stack based traversal methods have been moved to shared workgroup memory - this alone is a massive performance boost (~10x)
- threaded BLAS (stackless traversal that replaces individual instances in the acceleration structure)
- stratified wavelengths for spectral rendering
- LBVH binary AABB construction
- bug fixes
The README has also been extensively updated and there are new demo scenes.
Gifs, rendering to files, automated rendering of dynamic scenes
Spectral path tracing
Transforms, Instancing, 8-wide KDOP BLAS
Transforms!
Transforms (location, rotation, scale) are now part of the engine.
Other new features:
- Instancing
- TLAS/BLAS separation
- Wide trees
- KDOP bounding boxes
- Mixed wide/binary trees
- Transformed primitives
- misc performance optimizations
Notes:
In this update, transforms are nodes with one child that manipulate the ray that hits them. Transforms are tracked using a separate stack.
Instancing is a natural byproduct of transforms. Constructors such as loadSplat and loadObj now return pointers to their instances and transforms add an instance of that mesh/splat to the scene graph.
The scene graph then looks like:
root
├── transform
| └──Instance BLAS
└── transform
└──Instance BLAS
The scene graph supports more elaborate structures with nested transforms and BLAS structures with chains that might look like
root
└── transform
└── Group BLAS
├── Instance BLAS
└── transform
└── Instance BLAS
Or any other combination of tree, transform, and primitive nodes
Performance considerations
Performance has been increased considerably from previous versions.
According to NVIDIA Nsight the primary source of warp latency and stalls is Long Scoreboard stalls when retrieving primitive, acceleration structure, and stack nodes from memory.
Gaussian splat primitives are especially taxing on the acceleration structures due to their oblong and overlapping natures. Triangle meshes do not see the same performance impact as Gaussians of the same size due to triangle meshes usually not having large amounts of overlap and triangles are usually uniform in size.
Work is being done to reduce the latency. At the moment, wide KDOP acceleration structures provide 10x performance improvement compared to traditional binary AABBs, reducing the number of traversals (caused by fewer bounding box misses) and increasing ray throughput. The acceleration structure still struggles with large (5+ million primitive) BLAS.
That being said, this release can support moderate numbers of primitives at interactive framerates (30+ fps, 19ms per frame with spikes of 30-40 ms).
Progressive Rendering, Gaussian Splat primitive support
Added support for progressive rendering described as the following:
Frames: single pass of the fragment shader - progresses each ray by a single bounce
Images: combination of MAX_BOUNCES number of frames - is a single complete pass of the monte carlo path tracer
History: sum of all images that have occurred with the same scene parameters - the final render
Added support for Gaussian Splat primitives:
Uses a modified version of the collision algorithm described in Stochastic Ray Tracing of Transparent 3D Gaussians
Gaussian Splats are native primitives in the same way they are in my CPU path tracer
LBVH, Lights, Triangles, Obj loader
Raytracing in One Weekend: GPU Edition
This release is the foundation of the engine and includes all features found in Raytracing in One Weekend: GPU Edition.
Support includes:
- Spheres
- Instanced Materials
- FP Camera including FOV control






