From 979e0abb96affd71b31908866a6b3a0ad1669610 Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Sat, 23 Jun 2018 12:32:04 +0200 Subject: [PATCH 1/7] Update README.md --- README.md | 64 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index c8b9065c..f6d0330e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,30 @@ A comprehensive collection of open source C++ examples for [Vulkan®](https://ww [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](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](#Tessellation Shader) + + [Headless](#Headless) + + [User Interface](#User Interface) + + [Effects](#Effects) + + [Extensions](#Extensions) + + [Misc](#Misc) ++ [Credits and Attributions](#CreditsAttributions) ++ [Misc](#Misc) + + +## Cloning 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 ``` -## Assets +## 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 python download_assets.py from the root of the repository after cloning or see [this](data/README.md) for manual download. -## Building +## Building The repository contains everything required to compile and build the examples on Windows, Linux, Android, 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. -## Examples +## Examples -### Basics +### Basics #### [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. @@ -94,7 +117,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. -### Advanced +### Advanced #### [01 - Scene rendering](examples/scenerendering/) @@ -132,7 +155,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. -### Performance +### Performance #### [01 - Multi threaded command buffer generation](examples/multithreading/) @@ -154,7 +177,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. -### Physically based rendering +### 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. @@ -170,7 +193,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. -### Deferred +### Deferred These examples use a [deferred shading](https://en.wikipedia.org/wiki/Deferred_shading) setup. @@ -190,7 +213,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. -### Compute shader +### Compute Shader #### [01 - Image processing](examples/computeshader/) @@ -216,7 +239,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. -### Geometry shader +### Geometry Shader #### [01 - Normal debugging](examples/geometryshader/) @@ -226,7 +249,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```. -### Tessellation shader +### Tessellation Shader #### [01 - Displacement mapping](examples/tessellation/) @@ -240,7 +263,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. -### Headless +### 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)). @@ -252,7 +275,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. -### User interface +### User Interface #### [01 - Text rendering](examples/textoverlay/) @@ -266,7 +289,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. -### Effects +### Effects #### [01 - Fullscreen radial blur](examples/radialblur/) @@ -284,7 +307,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. -### Extensions +### Extensions #### [01 - Conservative rasterization (VK_EXT_conservative_rasterization)](examples/conservativeraster/) @@ -302,7 +325,7 @@ Renders a scene to to multiple views (layers) of a single framebuffer to simulat 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 +### Misc #### [01 - Vulkan Gears](examples/gears/) @@ -312,5 +335,8 @@ 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. -## Credits and attributions -See [CREDITS.md](CREDITS.md) for additional credits and attributions. \ No newline at end of file +## Credits and Attributions +See [CREDITS.md](CREDITS.md) for additional credits and attributions. + +## Ports + - [jvm, written in Kotlin](https://github.com/java-opengl-labs/Vulkan) From 5f41d1441abf74c56a09b8e69f41799a6f8d767e Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Sat, 23 Jun 2018 12:32:23 +0200 Subject: [PATCH 2/7] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f6d0330e..71d5d3a7 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ A comprehensive collection of open source C++ examples for [Vulkan®](https://ww + [Deferred](#Deferred) + [Compute Shader](#ComputeShader) + [Geometry Shader](#GeometryShader) - + [Tessellation Shader](#Tessellation Shader) + + [Tessellation Shader](#TessellationShader) + [Headless](#Headless) - + [User Interface](#User Interface) + + [User Interface](#UserInterface) + [Effects](#Effects) + [Extensions](#Extensions) + [Misc](#Misc) From c7771eed75e079dc2a4bc650baecbb1cd0fc7ebf Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Sat, 23 Jun 2018 12:34:25 +0200 Subject: [PATCH 3/7] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 71d5d3a7..1474d111 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ A comprehensive collection of open source C++ examples for [Vulkan®](https://ww + [Misc](#Misc) + [Credits and Attributions](#CreditsAttributions) + [Misc](#Misc) ++ [Ports](#Ports) ## Cloning @@ -339,4 +340,5 @@ Renders a Vulkan demo scene with logos and mascots. Not an actual example but mo See [CREDITS.md](CREDITS.md) for additional credits and attributions. ## Ports - - [jvm, written in Kotlin](https://github.com/java-opengl-labs/Vulkan) + + + [jvm, written in Kotlin](https://github.com/java-opengl-labs/Vulkan) From 646844a945db4abcdf7791ab973eb97258a96adc Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Sat, 23 Jun 2018 12:36:55 +0200 Subject: [PATCH 4/7] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 1474d111..76a0f378 100644 --- a/README.md +++ b/README.md @@ -340,5 +340,4 @@ Renders a Vulkan demo scene with logos and mascots. Not an actual example but mo See [CREDITS.md](CREDITS.md) for additional credits and attributions. ## Ports - - + [jvm, written in Kotlin](https://github.com/java-opengl-labs/Vulkan) +- [jvm, written in Kotlin](https://github.com/java-opengl-labs/Vulkan) From 4f8175506a0fb0abc6a902ac06ff6698619cee61 Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Fri, 20 Jul 2018 21:15:52 +0200 Subject: [PATCH 5/7] Update main.cpp --- examples/imgui/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/imgui/main.cpp b/examples/imgui/main.cpp index 572516df..b0769c97 100644 --- a/examples/imgui/main.cpp +++ b/examples/imgui/main.cpp @@ -403,7 +403,6 @@ public: } // Index buffer - VkDeviceSize indexSize = imDrawData->TotalIdxCount * sizeof(ImDrawIdx); if ((indexBuffer.buffer == VK_NULL_HANDLE) || (indexCount < imDrawData->TotalIdxCount)) { indexBuffer.unmap(); indexBuffer.destroy(); From 9efb5ff114b351fc8c61f62d3ef14909d0d276e7 Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Sun, 14 Oct 2018 21:00:00 +0200 Subject: [PATCH 6/7] Update README.md --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 76a0f378..4883f0a8 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ A comprehensive collection of open source C++ examples for [Vulkan®](https://ww + [Misc](#Misc) + [Credits and Attributions](#CreditsAttributions) + [Misc](#Misc) -+ [Ports](#Ports) ## Cloning @@ -338,6 +337,3 @@ Renders a Vulkan demo scene with logos and mascots. Not an actual example but mo ## Credits and Attributions See [CREDITS.md](CREDITS.md) for additional credits and attributions. - -## Ports -- [jvm, written in Kotlin](https://github.com/java-opengl-labs/Vulkan) From 08d8c6c42b1b33670f25f8971338a060a9963c59 Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Sun, 14 Oct 2018 21:00:07 +0200 Subject: [PATCH 7/7] Update main.cpp --- examples/imgui/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/imgui/main.cpp b/examples/imgui/main.cpp index b0769c97..572516df 100644 --- a/examples/imgui/main.cpp +++ b/examples/imgui/main.cpp @@ -403,6 +403,7 @@ public: } // Index buffer + VkDeviceSize indexSize = imDrawData->TotalIdxCount * sizeof(ImDrawIdx); if ((indexBuffer.buffer == VK_NULL_HANDLE) || (indexCount < imDrawData->TotalIdxCount)) { indexBuffer.unmap(); indexBuffer.destroy();