Git Product home page Git Product logo

donut_examples's Introduction

Donut Examples

This repository provides a collection of example applications built using the Donut framework.

Application DX11 DX12 VK Description
Feature Demo A demo application that shows most of the raster-based features and effects available.
Basic Triangle The most basic example that draws a single triangle.
Bindless Ray Tracing Renders a scene using ray tracing, starting from primary rays, and using bindless resources. Includes skeletal animation.
Bindless Rendering Renders a scene using bindless resources for minimal CPU overhead.
Deferred Shading Draws a textured cube into a G-buffer and applies deferred shading to it.
Meshlets Renders a triangle using meshlets.
Ray Traced Reflections Rasterizes the G-buffer and renders basic ray traced reflections. Materials are accessed using local root signatures.
Ray Traced Shadows Rasterizes the G-buffer and renders basic ray traced directional shadows.
Ray Traced Triangle Renders a triangle using ray tracing.
Shader Specializations Renders a few triangles using different specializations of the same shader.
Threaded Rendering Renders a cube map view of a scene using multiple threads, one per face.
Variable Shading Renders a scene with variable shading rate specified by a texture.
Vertex Buffer Creates a vertex buffer for a cube and draws the cube.

Requirements

Same as the requirements for Donut.

Build

  1. Clone the repository with all submodules:

    git clone --recursive <URL>

  2. Create a build folder.

    cd donut_examples && mkdir build && cd build

    • Any name works, but git is configured to ignore folders named 'build*'
    • This folder should be placed under directory created by 'git clone' in step #1
  3. Use CMake to configure the build and generate the project files.

    • Linux: cmake ..
    • Windows: use of CMake GUI is recommended. Make sure to select the x64 platform for the generator.
  4. Build the solution generated by CMake in the build folder.

    • Linux: make -j8 (example for an 8-core CPU)
    • Windows: Open the generated solution with Visual Studio and build it.
  5. Run the examples. They should be built in the bin folder.

Command Line

Most examples support multiple graphics APIs (on Windows). They are built with all APIs supported in the same executable, and the API can be switched from the command line. Use these command line arguments:

  • -dx11 for D3D11
  • -dx12 for D3D12 (default)
  • -vk for Vulkan

The Feature Demo supports additional command line arguments:

  • -debug to enable the graphics API debug layer or runtime, and the NVRHI validation layer.
  • -fullscreen to start in full screen mode.
  • -no-vsync to start without VSync (can be toggled in the GUI).
  • -print-graph to print the scene graph into the output log on startup.
  • -width and -height to set the window size.
  • <FileName> to load any supported model or scene from the given file.

License

Donut Examples are licensed under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.