New Vulkan glTF examples

Moving to glTF When I started writing my first Vulkan samples glTF was still in it’s infancy, esp. in terms of tooling. So I went with more common formats and went with the Open Asset importer library (Assimp) for loading these. But things rapidly changed with glTF 2.0, which is now pretty much and industry standard and supported by many DCC tools. And since both Vulkan and glTF are both Khronos standards this is a perfect match. [Read More]

Vulkan debug utilities sample and tutorial

I have contributed a new sample to the official Khronos Vulkan Samples repository that shows usage of the VK_EXT_debug_utils for adding debugging information to your Vulkan application. This extension combines the old VK_EXT_debug_marker and VK_EXT_debug_report into a new extension that also implements some changes and additions based on developer feedback for the old extensions. For example it’s now possible to debug instance creation and destruction with this new extension. [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]

Getting a Vulkan application up and running on a low-spec device with buggy drivers

Introduction Ever since starting to work on my C++ Vulkan glTF PBR application, I was bugged by the fact that it just wouldn’t work on my everyday phone, just crashing at a certain point with an error code that actually should never be thrown by that certain function. After a few unsuccessful attempts at finding the cause for this, I finally found the root of the problem and was actually able to get this up and running. [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]

How-to video: Debugging a non-visible model in Vulkan using RenderDoc

One of the most common Vulkan related that I’m seeing a lot is about rendering stuff that somehow ends up being not visible on the screen, even though technically everything looks okay (no validation layer errors, correct buffer uploads, etc.). Luckily there are debugging tools tools like RenderDoc that can help locating and fixing such problems. But not everyone knows about such tools or how to use them for debugging these kind of problems. [Read More]

The Vulkan Device Simulation Layer

LunarG recently made the new Vulkan Device Simulation layer public. This is a Vulkan instance level layer that injects physical device properties, limits and features based on a json input file, simulating different features than the actual Vulkan device you are running on. The idea behind this is to help developers check if their Vulkan applications can handle devices with missing features and tighter limits without having to actually run on a such a device. [Read More]

Vulkan tutorial on rendering a fullscreen quad without buffers

Rendering a fullscreen quad* the easy way (*) Which is actually just a huge triangle Having to render a fullscreen quad (or something that fills the whole screen) is a common task in 3D real time graphics, as many effects rely on rendering a texture over the whole screen with proper uv coordinates in the [0..1] range. This applies to post processing (glow, blur, ssao), deferred shading or procedurally generated output. [Read More]

Tutorial on using Vulkan's VK_EXT_debug_marker with RenderDoc

Warning VK_EXT_debug_marker is deprecated and has been replaced by VK_EXT_debug_utils. Please refer to this tutorial and sample instead. Intro The Vulkan validation layers included with the LunarG SDK are a must for debugging applications at run-time, and¬†every Vulkan developer should get used to them as soon as possible. They are crucial for getting applications validated against the specification and ensure portability across different implementations. But what they can’t catch are logical errors, so even with all validation layers enabled and all errors eliminated you still may not see what you where expecting and need an additional layer of debugging your rendering step-by-step. [Read More]