Future place for examples and demos for Khronos' new 3D and compute API Vulkan(tm)
I recently did a write-up with my personal view on Vulkan for a hobby developer. It goes into detail on some of the most important things to consider when deciding on how to switch over from Vulkan and also clears up some things that several press articles got wrong.
All examples are derived from a base class that encapsulates common used Vulkan functionality and all the setup stuff that's not necessary to repeat for each example. It also contains functions to load shaders and an easy wrapper to enable debugging via the validation layers.
If you want to create an example based on this base class, simply derive :
#include "vulkanexamplebase.h"
...
class MyVulkanExample : public VulkanExampleBase
{
...
VulkanExample()
{
width = 1024;
height = 1024;
zoom = -15;
rotation = glm::vec3(-45.0, 22.5, 0.0);
title = "My new Vulkan Example";
}
}todo : Document helper classes like vulkandebug
todo : In progress (order by complexity?)
Most basic example. Renders a colored triangle using an indexed vertex buffer, only one pipeline with very simple shaders. Uses a single uniform buffer for the matrices.
Loads a single texture and displays it on a simple quad.
Pipelines replace the huge (and cumbersome) state machine of OpenGL. This example creates different pipelines with different states and shader setups.
Vulkan interpretation of glxgears. Procedurally generates separate meshes for each gear, with every mesh having it's own uniform buffer object for animation. Also demonstrates how to use different descriptor sets.
todo : Current screenshot
Uses assimp to load a mesh from a common 3D format and shows how to render it in Vulkan.
todo : Current screenshot
Based on the mesh demo, but does instanced rendering of the same mesh using separate uniform buffers for each instance.
Uses a matcap texture (spherical reflection map) to fake complex lighting. It's based on this article.
Generating curved PN-Triangles on the GPU using tessellation shaders to add details to low-polygon meshes, based on this paper.
Uses tessellation shaders to generate and displace geometry based on a displacement map (heightmap).
Renders the vertex normals of a complex mesh with the use of a geometry shader. The mesh is rendered solid first and the a geometry shader that generates lines from the face normals is used in the second pass.
todo
TODO : In progress