Vulkan examples for ray traced shadows and reflections using VK_NV_ray_tracing

After adding a basic Nvidia RTX ray tracing example last week, I spent some more time with Vulkan and the VK_NV_ray_tracing extension. The result are two new, more advanced examples that I just uploaded to my Vulkan C++ example repository. As with the basic example I tried to keep them as straight forward as possible with all the relevant code parts put into one source file, so that following and building upon is as easy as possible. [Read More]

New Vulkan example on raytracing using VK_NV_ray_tracing

With all the new Turing extensions that NVIDIA has released alongside it’s new GPU architecture, I decided to replace my GTX 980 with a RTX 2060, mainly for the purpose of doing RTX ray-tracing related Vulkan stuff and also checking out things like mesh and task shaders. Getting my first RTX accelerated ray tracing example up and running was pretty easy, thanks to tutorials like the one from NVIDIA and iOrange. [Read More]

Flipping the Vulkan viewport

Introduction This short tutorial deals with Vulkan’s viewport setup, which differs from the one in OpenGL and other APIs. I’ll try to explain what it takes to get your (OpenGL) scene rendered properly, and how e.g. VK_KHR_MAINTENANCE1 can help you deal with differences across the APIs, something that’s esp. helpful if you try to add Vulkan as a backend to you renderer without wanting to alter your actual scene data. [Read More]

Vulkan conditional rendering

Introduction Note: Source code that demonstrates this feature can be found in this new example at my open source C++ Vulkan examples repository. With the new VK_EXT_conditional_rendering extension, Vulkan gains the possibility to execute certain rendering and dispatch commands conditionally, based on values stored in a dedicated buffer. So instead of having to rebuild command buffers if the visibility of objects change, it’s now to possible to just change a single buffer value to control if the rendering commands for that object are executed without the need to touch any command buffers. [Read More]

Vulkan input attachments and sub passes

Introduction I have added a new example to my open source C++ Vulkan examples that demonstrates the use of input attachments and subpasses within a single render pass. Input attachments are image views that can be used for pixel local load operations inside a fragment shader. This basically means that framebuffer attachments written in one subpass can be read from at the exact same pixel (that they have been written) in subsequent subpasses. [Read More]

Multiview rendering in Vulkan using VK_KHR_multiview

I have added a new example to my open source C++ Vulkan examples that demonstrates the use of multiview rendering. Multiview enables rendering to multiple views simultaneously instead of having to use multiple passes. Esp. with stereoscopic rendering (e.g. for VR related applications) there’s usually little change between two views, like different matrices, and having to do multiple passes for such small differences is inefficient. With multiview an implementation can now render different views simultaneously in a single pass and the Vulkan extension even adds hints for the implementation to even further improve performance (see correlation mask down below). [Read More]

Conservative rasterization in Vulkan using VK_EXT_conservative_rasterization

I have added a new example to my open source C++ Vulkan examples that demonstrates the basic use of conservative rasterization using the VK_EXT_conservative_rasterization extension. This has been missing from Vulkan some time now (while other APIs already offer this feature) but has recently been added and is already support by at least NVIDIA. Conservative rasterization changes the way fragments are generated, and enabling over estimation generates fragments for every pixel touched instead of only pixels that are fully covered. [Read More]

New Vulkan example: Cascaded shadow mapping

In what is most probably my last Vulkan example for 2017 I have added a cascaded shadow mapping example to my open source Vulkan C++ example repository: One big problem of traditional shadow mapping, esp. with large outdoor scenes is the resolution you get as one single shadow map has to cover the whole camera spectrum. With cascaded shadow maps the frustum is split up into multiple frustums (along scene depth) with each getting it’s own, full-resolution, depth map. [Read More]

Headless Vulkan examples

I have just added two minimal, mostly self-contained cross-platform headless Vulkan examples to my open source C++ Vulkan repository. Unlike the other examples in my repository these two don’t require a surface (created from a window) and as such can be run on systems with no window compositor. The intention behind the two examples is to show how Vulkan can be used for running graphics and compute tasks without the need for an actual user interface to be present i. [Read More]

iOS and macOS support added to the Vulkan examples

Thanks to a contribution from Bill Hollings, one of the developers from MoltenVK , my open source C++ Vulkan examples now also support Apple’s iOS and macOS platforms. MoltenVK is a commercial Vulkan implementation that runs on top of Apple’s Metal api with a free trial available. Details on how to build and run the examples for those platforms can be found in this readme. Note that not all examples will work on iOS or macOS due to the differences in supported features like geometry or tessellation shaders not being available in Metal. [Read More]