brief
Vulkan Samples
Code Cloud
Code cloud address
illustrate
Start by looking at the sequence number order, for example, from 2_Triangle , 3_DemoBase and the last one. Demo shows step by step how to simply encapsulate Vulkan to make it easier to use. If you start reading from a higher serial number, it may cause reading comprehension difficulties due to excessive encapsulation. Each demo will try to match a shallow document, which will roughly explain the intention of the demo.
Environmental Requirements
Windows
- CMake 3.13.0: Just download and install the latest version.
- Visual Studio 2017 (64-bit): It should be no problem if it is higher than it.
- VulkanSDK: https://www.lunarg.com/vulkan-sdk/
MacOS
- CMake 3.13.0: Just download and install the latest version.
- XCode 10: It should be no problem to be taller than it.
- macOS 10.11 or iOS 9: Because Vulkan does not receive official support from Apple, it is encapsulated by Metal, so it requires a system of 10.11 or above.
Linux
- CMake 3.13.0: Just download and install the latest version.
- Ubuntu 18.04: Currently I am using Ubuntu 18.04 system, and I haven't tried other versions.
- VSCode: I used VSCode as the development environment under Ubuntu. I have configured Configure (Task), Build (Task), and Debug under VSCode, but I need to install the VSCode C++ plug-in. The plug-in name is: C/C++.
Window environment construction
- Reference document: https://github.com/BobLChen/VulkanDemos/blob/master/document/BUILD_Windows.md
Ubuntu environment construction
- Reference documentation: https://github.com/BobLChen/VulkanTutorials/blob/master/document/BUILD_Ubuntu.md
MacOS environment construction
- Reference documentation: https://github.com/BobLChen/VulkanTutorials/blob/master/document/BUILD_MacOS.md
Android environment construction
- Reference documentation: https://github.com/BobLChen/VulkanTutorials/blob/master/document/BUILD_Android.md
Introduction
Vulkan Examples
Requirements
Windows
- CMake 3.13.0
- Virtual Studio 2017
- VulkanSDK: https://www.lunarg.com/vulkan-sdk/
MacOS
- XCode 10
- CMake 3.13.0
- macOS 10.11 or iOS 9
Linux
Android
- Android Studio 3.2
- NDK r16b
Usage
Command line
- git clone https://github.com/BobLChen/VulkanDemos.git
- cd VulkanDemos
- mkdir build
- cd build
- cmake ..
CMake-GUI
- git clone https://github.com/BobLChen/VulkanDemos.git
- Open CMake-GUI
- Where is the source code : VulkanDemos
- Where to build the binaries : VulkanDemos/build
- Click Configure button
- Choose your generator
- Click Generate button
Example
2_Triangle
Blog Address
3_DemoBase
Blog Address
4_OptimizeBuffer
Blog Address
5_OptimizeCommandBuffer
Blog Address
6_ImageGUI
Blog Address
7_UniformBuffer
Blog Address
8_OptimizeVertexIndexBuffer
Blog Address
9_LoadMesh
Blog Address
10_Pipelines
Blog Address
11_Texture
Blog Address
12_PushConstants
Blog Address
13_DynamicUniformBuffer
Blog Address
14_TextureArray
Blog Address
15_Texture3D
Blog Address
16_OptimizeShaderAndLayout
Blog Address
17_InputAttachments
18_SimpleDeferredShading
Blog Address
- Albedo:VK_FORMAT_R8G8B8A8_UNORM
- Normal:VK_FORMAT_R16G16B16A16_SFLOAT
- Position:VK_FORMAT_R16G16B16A16_SFLOAT
19_OptimizeDeferredShading
Blog Address
- Albedo: VK_FORMAT_R8G8B8A8_UNORM
- Normal: VK_FORMAT_R8G8B8A8_UNORM
- Position: Reconstructing world space position from depth buffer
20_Material
Blog Address
21_Stencil
Blog Address
22_RenderTarget(30 Filter)
Blog Address
23_OptimizeRenderTarget
Blog Address
24_EdgeDetect
Blog Address
25_Bloom
Blog Address
26_SkeletonMatrix4x4
Blog Address
27_SkeletonPackIndexWeight
Blog Address
- Pack 4 bone index(uint32) to 1 UInt32
- Pack 4 bone weight(float) to 2 UInt32 Reduce 5 float per vertex
28_SkeletonQuat
Blog Address
- Dual quat animation, reduce 8 float per bone. From matrix4x4 to 2 vector.
29_VertexTextureSkin
Blog Address
- Store skeleton datas in texture and used in vertex shader.
30_InstanceSkin
31_MSAA
32_FXAA
33_InstanceDraw
34_SimpleShadow
35_PCFShadow
36_OmniShadow(Multiview)
37_CascadedShadow
38_IndirectDraw
39_OcclusionQueries
40_QueryStatistics
41_ComputeShader
42_OptimizeComputeShader
43_ComputeParticles
44_ComputeRaytracing
45_ComputeFrustum
46_GeometryHouse
47_DebugNormal
48_GeometryOmniShadow
49_SimpleTessellation
50_PNTessellation
51_Pick
52_HDRPipeline
53_SSAO
54_ThreadedRendering
55_PBR_DirectLighting
56_PBR_IBL
57_GodRay
58_Imposter
59_MotionBlur
60_DepthPeeling
61_CPURayTracing
62_RTXRayTracingBasic
63_RTXRayTracingMesh
64_RTXRayTracingSimple
65_RTXRayTracingReflection
66_RTXRayTracingHitGroup
67_RTXRayTracingMonteCarlo
68_RTXPathTracing
69_TileBasedForwardRendering
70_SDFFont
71_ShuffleIntrinsics
72_MeshLOD