• Stars
    star
    164
  • Rank 230,032 (Top 5 %)
  • Language
    C++
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

  • Windows or Linux (x64 or ARM64)
  • CMake 3.10
  • A C++ 17 compiler (Visual Studio 2019, GCC 8 or Clang 6)
  • A shader compiler (FXC for DX11, DXC for DX12, DXC-SPIR-V for Vulkan - the newer the better)

Dependencies

Required (all included as git submodules):

  • cgltf to load glTF scenes
  • JsonCpp to read and write JSON scene and configuration files
  • stb to read and write textures and other images

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

  • NVRHI, ImGUI, and glfw for rendering (DONUT_WITH_NVRHI)
  • TaskFlow for multi-threading (DONUT_WITH_TASKFLOW)
  • tinyexr to read EXR images (DONUT_WITH_TINYEXR)
  • LZ4 to extract packaged media (DONUT_WITH_LZ4)
  • miniz to mount zip archives (DONUT_WITH_MINIZ)

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:

  • donut_core provides the basic functionality, including math, virtual file system (VFS), logging, JSON and other utilities. The core module does not include any graphics functions.
  • donut_engine implements scene import and maintenance, animations, materials, texture cache, descriptor table management, console variables, and basic audio. Depends on donut_core.
  • donut_render provides a collection of rendering passes, such as forward and deferred shading, temporal AA, SSAO, shadow maps, procedural sky, tone mapping, and bloom. Depends on donut_core and donut_engine.
  • donut_app is a framework for creating interactive applications and it includes the graphics device managers, UI bindings and utilities, camera, and media file systems. Depends on donut_core and donut_engine.

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:

  • Vulkan 1.2, requires Vulkan headers version 1.2.162 or later; included as a submodule of NVRHI (DONUT_WITH_VULKAN)
  • Direct3D 12, requires Windows SDK version 19041 or later (DONUT_WITH_DX12)
  • Direct3D 11, requires some compatible version of Windows SDK (DONUT_WITH_DX11)

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:

  • No morph targets
  • No KTX2 textures (but DDS textures are supported)

Supported glTF extensions:

  • KHR_materials_pbrSpecularGlossiness
  • KHR_materials_transmission
  • KHR_lights_punctual
  • MSFT_texture_dds.

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:

  • Forward shading
  • G-buffer fill
  • Deferred shading
  • Temporal anti-aliasing
  • Adaptive tone mapping
  • SSAO
  • Procedural sky

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.

More Repositories

1

kaolin

A PyTorch Library for Accelerating 3D Deep Learning Research
Python
4,452
star
2

PhysX

NVIDIA PhysX SDK
C++
2,893
star
3

Falcor

Real-Time Rendering Framework
C++
2,615
star
4

PhysX-3.4

NVIDIA PhysX SDK 3.4
C++
2,307
star
5

kaolin-wisp

NVIDIA Kaolin Wisp is a PyTorch library powered by NVIDIA Kaolin Core to work with neural fields (including NeRFs, NGLOD, instant-ngp and VQAD).
Python
1,450
star
6

rtx-remix

Combined repo for the RTX-Remix runtime
1,369
star
7

DxrTutorials

C++
834
star
8

RTXGI-DDGI

RTX Global Illumination (RTXGI)
C++
689
star
9

RTX-Path-Tracing

Real-time path tracing library and sample
C++
624
star
10

GettingStartedWithRTXRayTracing

Getting Started with RTX Ray Tracing
C++
613
star
11

FleX

C++
579
star
12

nvrhi

C++
525
star
13

RayTracingDenoiser

NVIDIA Ray Tracing Denoiser
HLSL
512
star
14

FaceWorks

A middleware library and sample application for high-quality skin and eye rendering
C++
450
star
15

NVIDIAImageScaling

NVIDIA Image Scaling SDK
C
426
star
16

Streamline

Streamline Integration Framework
C
400
star
17

RTXDI

C++
356
star
18

Blast

A modular destruction SDK designed for performance and flexibility, replacing APEX destruction
C++
331
star
19

dxvk-remix

C++
307
star
20

NvCloth

C
296
star
21

KickstartRT

KickstartRT SDK
C++
185
star
22

Flow

Flow is a sparse grid-based fluid simulation library for real-time applications.
C
168
star
23

HBAOPlus

HBAO+
C++
160
star
24

bridge-remix

This is the NVIDIA RTX Remix Runtime Bridge repository
C++
146
star
25

Displacement-MicroMap-Toolkit

C++
130
star
26

SpatiotemporalBlueNoiseSDK

C
127
star
27

UnityPhysXPlugin

Experimental Unity package to enable access to NVIDIA PhysX SDK 4 from within Unity.
C#
122
star
28

NRI

C++
90
star
29

RTXMU

C++
89
star
30

ShaderMake

Shader Compilation Tool
C++
78
star
31

donut_examples

C++
72
star
32

NRDSample

C++
69
star
33

GeForceNOW-SDK

This is the home of the SDK for GeForce NOW
C
65
star
34

KickstartRT_demo

Repo for KickstartRT demo application
C++
50
star
35

Opacity-MicroMap-SDK

Opacity Micro-Map SDK Source Repository
C++
36
star
36

MathLib

C++
28
star
37

Displacement-MicroMap-SDK

C++
19
star
38

Streamline_Sample

C++
17
star
39

nas-sample

C++
16
star
40

ComfyUI-RTX-Remix

ComfyUI RTX Remix
Python
14
star
41

Opacity-MicroMap-Samples

Samples repository for the Opacity MicroMap SDK
C++
11
star
42

Displacement-MicroMap-BaryFile

C++
11
star
43

NRIFramework

C
8
star
44

NRISamples

C++
7
star
45

rtxdi-runtime

HLSL
2
star