Merge pull request #495 from elect86/master
Added table of contents + Ports
This commit is contained in:
commit
80ec7a31f1
1 changed files with 42 additions and 19 deletions
61
README.md
61
README.md
|
|
@ -4,7 +4,30 @@ A comprehensive collection of open source C++ examples for [Vulkan®](https://ww
|
||||||
|
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BHXPMV6ZKPH9E)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BHXPMV6ZKPH9E)
|
||||||
|
|
||||||
## Cloning
|
---
|
||||||
|
## Table of Contents
|
||||||
|
+ [Cloning](#Cloning)
|
||||||
|
+ [Assets](#Assets)
|
||||||
|
+ [Building](#Building)
|
||||||
|
+ [Examples](#Examples)
|
||||||
|
+ [Basics](#Basics)
|
||||||
|
+ [Advanced](#Advanced)
|
||||||
|
+ [Performance](#Performance)
|
||||||
|
+ [Physically Based Rendering](#PBR)
|
||||||
|
+ [Deferred](#Deferred)
|
||||||
|
+ [Compute Shader](#ComputeShader)
|
||||||
|
+ [Geometry Shader](#GeometryShader)
|
||||||
|
+ [Tessellation Shader](#TessellationShader)
|
||||||
|
+ [Headless](#Headless)
|
||||||
|
+ [User Interface](#UserInterface)
|
||||||
|
+ [Effects](#Effects)
|
||||||
|
+ [Extensions](#Extensions)
|
||||||
|
+ [Misc](#Misc)
|
||||||
|
+ [Credits and Attributions](#CreditsAttributions)
|
||||||
|
+ [Misc](#Misc)
|
||||||
|
|
||||||
|
|
||||||
|
## <a name="Cloning"></a> Cloning
|
||||||
This repository contains submodules for external dependencies, so when doing a fresh clone you need to clone recursively:
|
This repository contains submodules for external dependencies, so when doing a fresh clone you need to clone recursively:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -18,22 +41,22 @@ git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
```
|
```
|
||||||
|
|
||||||
## Assets
|
## <a name="Assets"></a> Assets
|
||||||
Many examples require assets from the asset pack that is not part of this repository due to file size. A python script is included to download the asset pack that. Run
|
Many examples require assets from the asset pack that is not part of this repository due to file size. A python script is included to download the asset pack that. Run
|
||||||
|
|
||||||
python download_assets.py
|
python download_assets.py
|
||||||
|
|
||||||
from the root of the repository after cloning or see [this](data/README.md) for manual download.
|
from the root of the repository after cloning or see [this](data/README.md) for manual download.
|
||||||
|
|
||||||
## Building
|
## <a name="Building"></a> Building
|
||||||
|
|
||||||
The repository contains everything required to compile and build the examples on <img src="./images/windowslogo.png" alt="" height="22px" valign="bottom"> Windows, <img src="./images/linuxlogo.png" alt="" height="24px" valign="bottom"> Linux, <img src="./images/androidlogo.png" alt="" height="24px" valign="bottom"> Android, <img src="./images/applelogo.png" alt="" valign="bottom" height="24px"> iOS and macOS (using MoltenVK) using a C++ compiler that supports C++11.
|
The repository contains everything required to compile and build the examples on <img src="./images/windowslogo.png" alt="" height="22px" valign="bottom"> Windows, <img src="./images/linuxlogo.png" alt="" height="24px" valign="bottom"> Linux, <img src="./images/androidlogo.png" alt="" height="24px" valign="bottom"> Android, <img src="./images/applelogo.png" alt="" valign="bottom" height="24px"> iOS and macOS (using MoltenVK) using a C++ compiler that supports C++11.
|
||||||
|
|
||||||
See [BUILD.md](BUILD.md) for details on how to build for the different platforms.
|
See [BUILD.md](BUILD.md) for details on how to build for the different platforms.
|
||||||
|
|
||||||
## Examples
|
## <a name="Examples"></a> Examples
|
||||||
|
|
||||||
### Basics
|
### <a name="Basics"></a> Basics
|
||||||
|
|
||||||
#### [01 - Triangle](examples/triangle/)
|
#### [01 - Triangle](examples/triangle/)
|
||||||
Basic and verbose example for getting a colored triangle rendered to the screen using Vulkan. This is meant as a starting point for learning Vulkan from the ground up. A huge part of the code is boilerplate that is abstracted away in later examples.
|
Basic and verbose example for getting a colored triangle rendered to the screen using Vulkan. This is meant as a starting point for learning Vulkan from the ground up. A huge part of the code is boilerplate that is abstracted away in later examples.
|
||||||
|
|
@ -98,7 +121,7 @@ Implements a simple CPU based particle system. Particle data is stored in host m
|
||||||
|
|
||||||
Uses the stencil buffer and it's compare functionality for rendering a 3D model with dynamic outlines.
|
Uses the stencil buffer and it's compare functionality for rendering a 3D model with dynamic outlines.
|
||||||
|
|
||||||
### Advanced
|
### <a name="Advanced"></a> Advanced
|
||||||
|
|
||||||
#### [01 - Scene rendering](examples/scenerendering/)
|
#### [01 - Scene rendering](examples/scenerendering/)
|
||||||
|
|
||||||
|
|
@ -136,7 +159,7 @@ Loads and renders an animated skinned 3D model. Skinning is done on the GPU by p
|
||||||
|
|
||||||
Capturing and saving an image after a scene has been rendered using blits to copy the last swapchain image from optimal device to host local linear memory, so that it can be stored into a ppm image.
|
Capturing and saving an image after a scene has been rendered using blits to copy the last swapchain image from optimal device to host local linear memory, so that it can be stored into a ppm image.
|
||||||
|
|
||||||
### Performance
|
### <a name="Performance"></a> Performance
|
||||||
|
|
||||||
#### [01 - Multi threaded command buffer generation](examples/multithreading/)
|
#### [01 - Multi threaded command buffer generation](examples/multithreading/)
|
||||||
|
|
||||||
|
|
@ -158,7 +181,7 @@ Using query pool objects to get number of passed samples for rendered primitives
|
||||||
|
|
||||||
Using query pool objects to gather statistics from different stages of the pipeline like vertex, fragment shader and tessellation evaluation shader invocations depending on payload.
|
Using query pool objects to gather statistics from different stages of the pipeline like vertex, fragment shader and tessellation evaluation shader invocations depending on payload.
|
||||||
|
|
||||||
### Physically based rendering
|
### <a name="PBR"></a> Physically Based Rendering
|
||||||
|
|
||||||
Physical based rendering as a lighting technique that achieves a more realistic and dynamic look by applying approximations of bidirectional reflectance distribution functions based on measured real-world material parameters and environment lighting.
|
Physical based rendering as a lighting technique that achieves a more realistic and dynamic look by applying approximations of bidirectional reflectance distribution functions based on measured real-world material parameters and environment lighting.
|
||||||
|
|
||||||
|
|
@ -174,7 +197,7 @@ Adds image based lighting from an hdr environment cubemap to the PBR equation, u
|
||||||
|
|
||||||
Renders a model specially crafted for a metallic-roughness PBR workflow with textures defining material parameters for the PRB equation (albedo, metallic, roughness, baked ambient occlusion, normal maps) in an image based lighting environment.
|
Renders a model specially crafted for a metallic-roughness PBR workflow with textures defining material parameters for the PRB equation (albedo, metallic, roughness, baked ambient occlusion, normal maps) in an image based lighting environment.
|
||||||
|
|
||||||
### Deferred
|
### <a name="Deferred"></a> Deferred
|
||||||
|
|
||||||
These examples use a [deferred shading](https://en.wikipedia.org/wiki/Deferred_shading) setup.
|
These examples use a [deferred shading](https://en.wikipedia.org/wiki/Deferred_shading) setup.
|
||||||
|
|
||||||
|
|
@ -194,7 +217,7 @@ Adds shadows from multiple spotlights to a deferred renderer using a layered dep
|
||||||
|
|
||||||
Adds ambient occlusion in screen space to a 3D scene. Depth values from a previous deferred pass are used to generate an ambient occlusion texture that is blurred before being applied to the scene in a final composition path.
|
Adds ambient occlusion in screen space to a 3D scene. Depth values from a previous deferred pass are used to generate an ambient occlusion texture that is blurred before being applied to the scene in a final composition path.
|
||||||
|
|
||||||
### Compute shader
|
### <a name="ComputeShader"></a> Compute Shader
|
||||||
|
|
||||||
#### [01 - Image processing](examples/computeshader/)
|
#### [01 - Image processing](examples/computeshader/)
|
||||||
|
|
||||||
|
|
@ -220,7 +243,7 @@ Mass-spring based cloth system on the GPU using a compute shader to calculate an
|
||||||
|
|
||||||
Purely GPU based frustum visibility culling and level-of-detail system. A compute shader is used to modify draw commands stored in an indirect draw commands buffer to toggle model visibility and select it's level-of-detail based on camera distance, no calculations have to be done on and synced with the CPU.
|
Purely GPU based frustum visibility culling and level-of-detail system. A compute shader is used to modify draw commands stored in an indirect draw commands buffer to toggle model visibility and select it's level-of-detail based on camera distance, no calculations have to be done on and synced with the CPU.
|
||||||
|
|
||||||
### Geometry shader
|
### <a name="GeometryShader"></a> Geometry Shader
|
||||||
|
|
||||||
#### [01 - Normal debugging](examples/geometryshader/)
|
#### [01 - Normal debugging](examples/geometryshader/)
|
||||||
|
|
||||||
|
|
@ -230,7 +253,7 @@ Visualizing per-vertex model normals (for debugging). First pass renders the pla
|
||||||
|
|
||||||
Renders a scene to multiple viewports in one pass using a geometry shader to apply different matrices per viewport to simulate stereoscopic rendering (left/right). Requires a device with support for ```multiViewport```.
|
Renders a scene to multiple viewports in one pass using a geometry shader to apply different matrices per viewport to simulate stereoscopic rendering (left/right). Requires a device with support for ```multiViewport```.
|
||||||
|
|
||||||
### Tessellation shader
|
### <a name="TessellationShader"></a> Tessellation Shader
|
||||||
|
|
||||||
#### [01 - Displacement mapping](examples/tessellation/)
|
#### [01 - Displacement mapping](examples/tessellation/)
|
||||||
|
|
||||||
|
|
@ -244,7 +267,7 @@ Renders a terrain using tessellation shaders for height displacement (based on a
|
||||||
|
|
||||||
Uses curved PN-triangles ([paper](http://alex.vlachos.com/graphics/CurvedPNTriangles.pdf)) for adding details to a low-polygon model.
|
Uses curved PN-triangles ([paper](http://alex.vlachos.com/graphics/CurvedPNTriangles.pdf)) for adding details to a low-polygon model.
|
||||||
|
|
||||||
### Headless
|
### <a name="Headless"></a> Headless
|
||||||
|
|
||||||
Examples that run one-time tasks and don't make use of visual output (no window system integration). These can be run in environments where no user interface is available ([blog entry](https://www.saschawillems.de/?p=2719)).
|
Examples that run one-time tasks and don't make use of visual output (no window system integration). These can be run in environments where no user interface is available ([blog entry](https://www.saschawillems.de/?p=2719)).
|
||||||
|
|
||||||
|
|
@ -256,7 +279,7 @@ Renders a basic scene to a (non-visible) frame buffer attachment, reads it back
|
||||||
|
|
||||||
Only uses compute shader capabilities for running calculations on an input data set (passed via SSBO). A fibonacci row is calculated based on input data via the compute shader, stored back and displayed via command line.
|
Only uses compute shader capabilities for running calculations on an input data set (passed via SSBO). A fibonacci row is calculated based on input data via the compute shader, stored back and displayed via command line.
|
||||||
|
|
||||||
### User interface
|
### <a name="UserInterface"></a> User Interface
|
||||||
|
|
||||||
#### [01 - Text rendering](examples/textoverlay/)
|
#### [01 - Text rendering](examples/textoverlay/)
|
||||||
|
|
||||||
|
|
@ -270,7 +293,7 @@ Uses a texture that stores signed distance field information per character along
|
||||||
|
|
||||||
Generates and renders a complex user interface with multiple windows, controls and user interaction on top of a 3D scene. The UI is generated using [Dear ImGUI](https://github.com/ocornut/imgui) and updated each frame.
|
Generates and renders a complex user interface with multiple windows, controls and user interaction on top of a 3D scene. The UI is generated using [Dear ImGUI](https://github.com/ocornut/imgui) and updated each frame.
|
||||||
|
|
||||||
### Effects
|
### <a name="Effects"></a> Effects
|
||||||
|
|
||||||
#### [01 - Fullscreen radial blur](examples/radialblur/)
|
#### [01 - Fullscreen radial blur](examples/radialblur/)
|
||||||
|
|
||||||
|
|
@ -288,7 +311,7 @@ Implements multiple texture mapping methods to simulate depth based on texture i
|
||||||
|
|
||||||
Uses a spherical material capture texture array defining environment lighting and reflection information to fake complex lighting.
|
Uses a spherical material capture texture array defining environment lighting and reflection information to fake complex lighting.
|
||||||
|
|
||||||
### Extensions
|
### <a name="Extensions"></a> Extensions
|
||||||
|
|
||||||
#### [01 - Conservative rasterization (VK_EXT_conservative_rasterization)](examples/conservativeraster/)
|
#### [01 - Conservative rasterization (VK_EXT_conservative_rasterization)](examples/conservativeraster/)
|
||||||
|
|
||||||
|
|
@ -314,7 +337,7 @@ Demonstrates the use of VK_EXT_conditional_rendering to conditionally dispatch r
|
||||||
|
|
||||||
Uses the VK_EXT_debug_marker extension to set debug markers, regions and to name Vulkan objects for advanced debugging in graphics debuggers like [RenderDoc](https://www.renderdoc.org). Details can be found in [this tutorial](https://www.saschawillems.de/?page_id=2017).
|
Uses the VK_EXT_debug_marker extension to set debug markers, regions and to name Vulkan objects for advanced debugging in graphics debuggers like [RenderDoc](https://www.renderdoc.org). Details can be found in [this tutorial](https://www.saschawillems.de/?page_id=2017).
|
||||||
|
|
||||||
### Misc
|
### <a name="Misc"></a> Misc
|
||||||
|
|
||||||
#### [01 - Vulkan Gears](examples/gears/)
|
#### [01 - Vulkan Gears](examples/gears/)
|
||||||
|
|
||||||
|
|
@ -324,5 +347,5 @@ Vulkan interpretation of glxgears. Procedurally generates and animates multiple
|
||||||
|
|
||||||
Renders a Vulkan demo scene with logos and mascots. Not an actual example but more of a playground and showcase.
|
Renders a Vulkan demo scene with logos and mascots. Not an actual example but more of a playground and showcase.
|
||||||
|
|
||||||
## Credits and attributions
|
## <a name="CreditsAttributions"></a> Credits and Attributions
|
||||||
See [CREDITS.md](CREDITS.md) for additional credits and attributions.
|
See [CREDITS.md](CREDITS.md) for additional credits and attributions.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue