- Notifications
You must be signed in to change notification settings - Fork94
Sample projects demonstrating the usage of Diligent Engine
License
DiligentGraphics/DiligentSamples
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This module contains tutorials and sample applications intended to demonstrate the usage ofDiligent Engine. The module depends ontheCore,Tools,andFX submodules.
To build and run the applications, please clone themain repositoryand follow theinstructions.
| Platform | Build Status |
|---|---|
Windows | |
Universal Windows | |
Linux | |
Android | |
MacOS | |
iOS | |
tvOS | |
Web |
- Tutorials
- 01 - Hello Triangle
- 02 - Cube
- 03 - Texturing
- 03 - Texturing-C
- 03 - Texturing-DotNet
- 04 - Instancing
- 05 - Texture Array
- 06 - Multithreading
- 07 - Geometry Shader
- 08 - Tessellation
- 09 - Quads
- 10 - Data Streaming
- 11 - Resource Updates
- 12 - Render Target
- 13 - Shadow Map
- 14 - Compute Shader
- 15 - Multiple Windows
- 16 - Bindless Resources
- 17 - MSAA
- 18 - Queries
- 19 - Render Passes
- 20 - Mesh Shader
- 21 - Ray Tracing
- 22 - Hybrid Rendering
- 23 - Command Queues
- 24 - Variable Rate Shading
- 25 - Render State Packager
- 26 - Render State Cache
- 27 - Post-Processing
- 28 - Hello-OpenXR
- 29 - OIT
- Samples
- Build and Run Instructions
- License
- Contributing
This tutorial shows how to render simple triangle using Diligent Engine API.
This tutorial demonstrates how to render an actual 3D object, a cube. It shows how to load shaders from files, create and use vertex,index and uniform buffers.
This tutorial demonstrates how to apply a texture to a 3D object. It shows how to load a texture from file, create shader resourcebinding object and how to sample a texture in the shader.
This tutorial is identical to Tutorial03, but is implemented using the C API.
This tutorial demonstrates how to use the Diligent Engine API in .NET applications.
This tutorial demonstrates how to use instancing to render multiple copies of one objectusing unique transformation matrix for every copy.
This tutorial demonstrates how to combine instancing with texture arrays touse unique texture for every instance.
This tutorial shows how to generate command lists in parallel from multiple threads.
This tutorial shows how to use geometry shader to render smooth wireframe.
This tutorial shows how to use hardware tessellation to implement simple adaptive terrainrendering algorithm.
This tutorial shows how to render multiple 2D quads, frequently switching textures and blend modes.
This tutorial shows dynamic buffer mapping strategy usingMAP_FLAG_DISCARD andMAP_FLAG_DO_NOT_SYNCHRONIZEflags to efficiently stream varying amounts of data to GPU.
This tutorial demonstrates different ways to update buffers and textures in Diligent Engine and explainsimportant internal details and performance implications related to each method.
This tutorial demonstrates how to render a 3d cube into an offscreen render target and do a simplepost-processing effect.
This tutorial demonstrates how to render basic shadows using a shadow map.
This tutorial shows how to implement a simple particle simulation system using compute shaders.
This tutorial demonstrates how to use Diligent Engine to render to multiple windows.
This tutorial shows how to implement bindless resources, a technique that leveragesdynamic shader resource indexing feature enabled by the next-gen APIs to significantly improverendering performance.
This tutorial demonstrates how to use multisample anti-aliasing (MSAA) to makegeometrical edges look smoother and more temporarily stable.
This tutorial demonstrates how to use queries to retrieve various information aboutthe GPU operation, such as the number of primitives rendered, command processing duration, etc.
This tutorial demonstrates how to use the render passes API to implement simple deferred shading.
This tutorial demonstrates how to use amplification and mesh shaders, the new programmable stages, to implementview frustum culling and object LOD calculation on the GPU.
This tutorial demonstrates the basics of using ray tracing API in Diligent Engine.
This tutorial demonstrates how to implement a simple hybrid renderer that combines rasterization with ray tracing.
This tutorial demonstrates how to use multiple command queues to perform rendering in parallel with copy and compute operations.
This tutorial demonstrates how to use variable rate shading to reduce the pixel shading load.
This tutorial shows how to create and archive pipeline states with the render state packager off-line toolon the example of a simple path tracer.
This tutorial expands the path tracing technique implemented in previous tutorial and demonstrateshow to use the render state cache to save pipeline states created at run time and load them when theapplication starts.
This tutorial demonstrates how to use post-processing effects from the DiligentFX module.
This tutorial demonstrates how to use Diligent Engine with OpenXR API to render a simple scene in a VR headset.
This tutorial demonstrates how to implement order-independent transparency (OIT) methods to render transparent objects without sorting.
This sample demonstrates how to integrateEpipolar Light Scatteringpost-processing effect into an application to render physically-based atmosphere.
This simple maze mini-game demonstrates how to use GLFW to create window and handle keyboard and mouse input.
![]() | ![]() |
![]() | ![]() |
This sample demonstrates how to use theAsset LoaderandGLTF PBR Renderer to load and render GLTF models.
This sample demonstrates how to render USD files usingHydrogent,an implementation of the Hydra rendering API in Diligent Engine.
This sample demonstrates how to integrate theShadowing componentinto an application to render high-quality shadows.
This sample demonstrates the integration of the engine withdear imgui UI library.
This sample demonstrates the integration of the engine withnuklear UI library.
This sample demonstrates how to use Diligent Engine in a basic Android AR application.
This sample is designed to be a performance benchmark and is based onthis demodeveloped by Intel. It renders 50,000 unique textured asteroids. Every asteroid is a combination of one of 1000unique meshes and one of 10 unique textures. The sample uses original D3D11 and D3D12 native implementations,and adds implementations using Diligent Engine API to allow comparing performance of different rendering modes.
This project demonstrates integration of Diligent Engine with Unity.
Please refer to Build and Run Instructions section in themaster repository's readme.
Command line options:
- --mode,-m {d3d11|d3d12|vk|gl} - select rendering back-end (example:--mode d3d12,-m vk).
- --width,-wvalue - set desired window width (example:--width 1024,-w 1280).
- --height,-hvalue - set desired window height (example:--height 768,-h 1024).
- --capture_pathpath - path to the folder where screen captures will be saved. Specifying this parameter enables screen capture (example:--capture_path .).
- --capture_namename - screen capture file name. Specifying this parameter enables screen capture (example:--capture_name frame).
- --capture_fpsfps - recording fps when capturing frame sequence (example:--capture_fps 10). Default value: 15.
- --capture_framesvalue - number of frames to capture after the app starts (example:--capture_frames 50).
- --capture_format {jpg|png} - image file format (example:--capture_format jpg). Default value: jpg.
- --capture_qualityvalue - jpeg quality (example:--capture_quality 80). Default value: 95.
- --capture_alphavalue - when saving png, whether to write alpha channel (example:--capture_alpha 1). Default value: false.
- --validationvalue - set validation level (example:--validation 1). Default value: 1 in debug build; 0 in release builds.
- --adaptervalue - select GPU adapter, if there are more than one installed on the system (example:--adapter 1). Default value: 0.
- --adapters_dialogvalue - whether to show adapters dialog (example:--adapters_dialog 0). Default value: 1.
- --show_uivalue - whether to show user interface (example:--show_ui 0). Default value: 1.
- --golden_image_mode {none|capture|compare|compare_update} - golden image capture mode. Default value: none.
- --golden_image_tolerancevalue - golden image comparison tolerance. Default value: 0.
- --non_separable_progsvalue - force non-separable programs in GL
When image capture is enabled the following hot keys are available:
- F2 starts frame capture recording.
- F3 finishes frame capture recroding.
- F4 saves single screenshot.
To record multiple frames after the app starts, use command line like this:
--mode d3d12 --capture_path . --capture_fps 15 --capture_name frame --width 640 --height 480 --capture_format png --capture_frames 50This project has some third-party dependencies, each of which may have independent licensing:
- nuklear: A single-header ANSI C gui library (MIT or Public domain license).
- glfw: A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input (zlib License).
- ImGuizmo: Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui (MIT).
To contribute your code, submit aPull Requestto this repository.Diligent Engine is licensed under theApache 2.0 license that guaranteesthat content in theDiligentSamples repository is free of Intellectual Property encumbrances.In submitting any content to this repository,you license that content under the same terms,and you agree that the content is free of any Intellectual Property claims and you have the right to license it under those terms.
Diligent Engine usesclang-format to ensureconsistent source code style throughout the code base. The format is validated by CIfor each commit and pull request, and the build will fail if any code formatting issue is found. Please refertothis page for instructionson how to set up clang-format and automatic code formatting.
About
Sample projects demonstrating the usage of Diligent Engine
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors9
Uh oh!
There was an error while loading.Please reload this page.



















































