Skip to content

Latest commit

 

History

History
66 lines (44 loc) · 2.68 KB

README.md

File metadata and controls

66 lines (44 loc) · 2.68 KB

CUDA-Path-Tracer

cornell_box

Commands

If you have the just command runner installed you can run the command just to see the list of available commands. In particular, to run the application use:

just run -s examples/cornell_box.json

or equivalently:

cmake -S . -B build
cmake --build build
./build/apps/cuda_path_tracer -s examples/cornell_box.json

Where the -s flag (or --scene) specifies the scene file to render. You can find example scene files in the examples/ directory. You can also specify the quality of the render using the -q flag (or --quality), for example:

just run -s examples/cornell_box.json -q high

Where "high" is the default quality level. The available quality levels are "low", "medium" and "high".

Each argument passed to the just build command is forwarded to cmake, for example, to build the project for all major CUDA architectures use:

just build -DCMAKE_CUDA_ARCHITECTURES=all-major

Testing and Benchmarking

Benchmarks are integrated in the testing suite. The just bench command will run NVIDIA's Nsight Systems profiler on the main application. To run the tests with the integrated benchmarks use:

just test

or equivalently:

cmake -S . -B build -DBUILD_TESTING=ON
cmake --build build
./build/tests/tests

Tip

Certain benchmarks in the test suite will take a while to complete, to run only the unit tests you can use the just test --skip-benchmarks command.

Repository Structure

Code

  • apps/: Application code that uses the cuda_path_tracer library. Here you can find a demo application that renders a scene using the library.
  • examples/: Example scene files that can be rendered using the demo application.
  • include/: Public headers of the cuda_path_tracer library. Here you can find the Camera class that is used to render a scene. The core of the library is in include/cuda_path_tracer/camera.cuh and its inline implementation in include/cuda_path_tracer/camera.inl due to the camera code making heavy usage of templating to handle hyperparameters.
  • src/: Implementation of the cuda_path_tracer library.
  • tests/: Unit tests for the cuda_path_tracer library and benchmarks. In particular, in [tests/test_render_bench.cu](tests/test_render_bench.cu) you can find benchmarks for hyperparameters tuning of the Cameraclass and an example of direct usage of thecuda_path_tracer` library.

Report

  • report/: Typst source code of the report.