Skip to content

Compilation

Xiang Feng edited this page Jun 17, 2022 · 2 revisions

Dependencies

  • C++ compiler. MSVC 19.31.31105 and gcc 9.4.0 was tested.
  • CMake. Version 3.16 was tested.
  • NVIDIA driver. Should be released on or after December 15th, 2020, for the implementations of the new official versions of the Vulkan ray tracing extensions. RTX 3060 Ti with Driver Version 512.15 was tested. Whether this project supports non NVIDIA graphics cards has not been determined.
  • Vulkan SDK. Version 1.3.204.1 was tested.
  • OptiX 7. Version 7.4.0 was tested.

Compile

$ git clone git@github.com:f1shel/Asuna.git --recursive
$ mkdir Asuna/build
$ cd Asuna/build
$ cmake ..
$ make # or build in IDE on windows

The binary file is placed in the Asuna/bin_x64 folder.

Docker

One can compile Asuna in the docker. The Dockerfile is placed in Asuna/docker and you can build image with following command:

$ cd Asuna/docker
$ docker build --pull --tag "asuna:latest" --file Dockerfile .

To start image you can type:

docker run --rm -it \
    --runtime=nvidia \
    -e NVIDIA_DRIVER_CAPABILITIES=all \
    asuna:latest /bin/bash

Note that nvidia-container-toolkit is required for accessing GPU in the docker.

Usage

$ ./asuna.exe --scene scenes/cornell_box/scene.json [--offline] [--out cbox]

Architecture

  • Initializing: window, surface, context, device, allocator

  • Parsing scene: interpret scene file and generate meta data

  • Allocating scene resources: convert meta data to gpu resources

  • Building pipeline

  • Binding pipeline and resources

  • Rendering

class AsunaTracer : public AppBaseVk {
    class Context; ----------------|
    class Scene;   ----------|     |
    class Pipeline;   <------|-----|
    void run();
};

Clone this wiki locally