Home

Awesome

Donut

Donut is a real-time rendering framework built by NVIDIA DevTech for use in various prototype renderers and code samples. It provides a collection of reusable and somewhat extensible rendering passes that can be put together in an application, and a system for loading a scene and maintaining its component graph.

Donut is not a game engine. It does not provide any means for creating interactive experiences, such as actors or navigation.

Donut has originated from the VRWorks Multi-Projection SDK and has been improved and evolved since. Different versions of Donut have been used to build the Asteroids demo, the DLSS SDK, and the RTXDI SDK.

Requirements

Dependencies

Required (all included as git submodules):

Optional (also included as git submodules but can be disabled through CMake variables):

Examples

Example projects that use Donut can be found in a separate repository: donut_examples.

Build

Donut is not set up to be built as a separate project. It should always be included as a submodule into a larger CMake-based project. Follow the instructions for each project to get it built.

Structure

Donut consists of 4 major subsystems, represented as separate static libraries:

The engine and render modules require some shaders, which can be found in the shaders folder and built with the donut_shaders target.

Features

Graphics API support

Most interaction with graphics APIs is done through the NVRHI abstraction layer. Donut and NVRHI support the following GAPIs:

Note that NVRHI does not provide any means to create the GAPI devices or windows, that functionality is handled by the DeviceManager class and its descendants in donut_app.

Scene formats

In this version, Donut can only import glTF 2.0 models with some limitations:

Supported glTF extensions:

In addition to glTF, Donut supports its own JSON-based scene layout files. Those files can load multiple glTF models and combine them into a larger scene graph, also add lights, cameras, animations, and apply animations to scene nodes imported from the models using their paths.

Render passes

For a full list of render passes, refer to the headers in the include/donut/render folder.

The most useful passes are:

Ray tracing

Donut does not provide any ray tracing passes or even maintain acceleration structures (AS'es). That is mostly because the requirements for ray tracing AS'es are different in each application, and those affect the passes that use the AS'es. But it does provide a generic bindless resource table that is populated with textures and geometry data buffers when the scene is loaded. Building acceleration structures for a scene can be easily handled on the application side using the data structures provided by Donut's scene representation and the NVRHI abstractions.

License

Donut is licensed under the MIT License.