How nvidia-rtx/donut works
Project type and purpose
• This is a modular, real-time rendering framework (“Donut”) composed of four static libraries:
• donut_core
• donut_engine
• donut_render
• donut_app
• Its goal is to provide reusable rendering passes, scene loading, and application scaffolding for prototypes and code samples.
• It is _not_ a game engine (no actors, navigation), but a rendering toolkit built on top of NVRHI and other submodules.
File structure
• Top-level CMake scripts and modules orchestrate build of each static library.
• include/donut/... folders expose headers for each subsystem.
• src/... folders contain the implementation for each subsystem.
• shaders/ folder and include/donut/shaders contain HLSL/GLSL shader definitions and binding helpers.
• thirdparty/ holds required and optional dependencies (cgltf, JsonCpp, stb, NVRHI, ImGUI, TaskFlow, etc.).
README for additional insights
• Four major subsystems and their dependencies are clearly described.
• Submodule dependencies (cgltf, JsonCpp, stb, NVRHI, etc.) are listed with build-time flags.
• Graphics API support is via NVRHI, with device creation and windowing handled by the DeviceManager classes in donut_app.
Elements
• Clear labels for each static library and folder (core, engine, render, app).
• In core: VFS, math utilities, logging, JSON
• In engine: SceneGraph, MaterialBindingCache, TextureCache, ConsoleInterpreter
• In render: ForwardShadingPass, DeferredLightingPass, SSAOPass, TAA, ToneMapping
• In app: ApplicationBase, MediaFileSystem, Camera, DeviceManager_VK, UI helpers
• Blue for core
• Green for engine
• Orange for render
• Purple for app
• Gray for external dependencies
• Rectangles for subsystems
• Rounded rectangles for key classes