otabuzzman / RTXplay

A lab for playing around with NVIDIA's realtime ray tracing concept.
6 stars 0 forks source link

RTXplay

A lab for playing around with NVIDIA's realtime raytracing concept. The lab intends to migrate Pete Shirley's raytracer presented in his book series Raytracing in one weekend (RTOW) to become Raytracing with OptiX (RTWO) which utilizes the new RT cores introduced by NVIDIA with Turing microarchitecture.

Code in the top-level folder was created while working through the first book of Pete's series. Creation followed the suggested method of typing yourself and foregoing copy and paste. Doing so there have been few changes to the code logic. Most changes concerned with style guide and naming.

The optx folder contains RTWO. Work started out with the optixTriangle sample from the OptiX SDK which has been modified step by step as shown by the repository's commit history.

First aim was a 1:1 port of RTOW to OptiX to get RTWO. Result is in manastra branch. After that, work proceeded with arbitrarily picked objectives to explore various OptiX features. See commit history of main branch for details.

Build

Due to lack of appropriate hardware development and tests had been split on Windows and Linux respectively.

Windows (Development)

[^1]: NVCC may fail with newer versions.

Linux

Gallery

RTWO (Raytracing with OptiX) samples
1 spp (samples per pixel) in 189 milliseconds 50 spp in 776 milliseconds
1 spp in 189 milliseconds 50 spp in 776 milliseconds
500 spp (default) in 5586 milliseconds no defocus blur
500 spp in 5586 milliseconds no defocus blur
RTWO samples with experimental triangle hit correction made with branch hitcorr
enabled for diffuse only reflect added refract added
enabled for diffuse only reflect added refract added
Sphere (subdivided tetrahedron) samples made with commit
single triangle, no subdivision 1 subdivision 2 subdivisions
single triangle, no subdivision 1 subdivision 2 subdivisions
3 subdivisions 4 subdivisions 5 subdivisions
3 subdivisions 4 subdivisions 5 subdivisions
6 subdivisions sphere (6 subdivisions) triangled bounding box
6 subdivisions sphere (6 subdivisions) triangled bounding box