Vulkan tip on rendering a fullscreen quad without buffers


Rendering a fullscreen quad is a common task in 3D realtime graphics, especially with shaders making post processing a common functionality and other techniques like deferred shading also relying on having a quad with uv coordinates cover the whole screen.

While doing some refactoring on my Vulkan examples I removed some code that used vertex and index buffers for rendering such a quad and replaced it with a simple way that generates vertices and uvs in the vertex shader, saving some lines of code.

You can find the article on rendering a fullscreen quad (without buffers) here.

Vulkan tip on rendering a fullscreen quad without buffers

Porting (Vulkan)Quake to Android

Axel Gneiting from iD software recently ported Quake to Vulkan (based on the QuakeSpasm OpenGL port) and released the sources at github with support for windows and Linux. With Vulkan also being available on Android, I decided to use the knowledge gained while porting my Vulkan examples and Demos over to Android and add it to his Vulkan Quake port.

I have tested with the registered and full .pak files of the original Quake and both are fully playable. The Android port supports gamepads and all the gameplay elements are there, including working multiplayer. A few things are still missing, e.g. there is no sound yet as SDL audio doesn’t work on Android out-of-the box. I’m currently looking into implementing OpenSL but no ETA on that yet.

No binaries yet (as the .pak file has to be packed in the .apk and I don’t want to redistribute these), but if you want to try this, the code is available at

It includes all files necessary to build the APK using the Android NDK and should run on other Android devices too (but note that you’d need a gamepad).

Continue reading “Porting (Vulkan)Quake to Android”


New Vulkan example: Indirect drawing

I have added another example to my open source C++ Vulkan examples. The new one is about indirect drawing (including multi draw if supported). Contrary to their non-direct counterparts, the indirect drawing commands in Vulkan take their draw calls from a buffer that is ideally stored in device local memory. So instead of running single draw commands that get their index base, index count and instancing numbers passed by the host upon getting called, the indirect commands are backed by a buffer that stores an arbitrary number of draw commands.

The example renders a huge number of plants with different geometries only using one single draw call. All plants geometries are stored in one buffer, and each indirect draw command uses different index offsets and also does instancing.


This technique is the based for several GPU-based functions that have traditionally been handled by the CPU. As the draw commands are stored in a buffer that the GPU has access too, it’s now possible to have a compute shader manipulate the draw commands that are issued so the GPU can take on tasks like culling or draw command generation in general.


New Vulkan example: Indirect drawing

New Vulkan example: Deferred shading and shadows

Based on the recently updated deferred shading example, I have added a new example to my open source C++ Vulkan samples. This example adds dynamic shadows from multiple light sources, showcasing a few technologies that can be used to make rendering of multiple shadows more efficient.

To achieve this, the example uses a layered depth attachment with one layer per light source that is sampled in the final scene composition. Traditionally one would do multiple passes to render the depth maps for the scene’s light source, and to avoid this the example also uses shader instancing by doing multiple invocations in the geometry shader. The geometry shader then uses the invocation index to output into the different layers of the depth attachment, with the matrices from the different point-of-views of the light sources getting passed as an array.

This is an approach that fits modern GPUs very well and allows for an arbitrary number of shadow casting light sources to be added without the need to add multiple render passes.



Updated Vulkan deferred shading example video

Over the past few weeks and months I’ve been constantly working on my Vulkan examples, enhancing existing demos, adding new ones, fixing bugs reported and merging pull requests (thx to anyone that has contributed!). I even found some time to work on a Vulkn deferred shading playground using Crytek’s famous Sponza model. You can find the repository for it here.

This Sunday I decided to visually upgrade the deferred shading example included in my samples repository. Deferred shading is commonly used nowadays, and I felt that the example didn’t showcase the technique properly. And so I went on to add some normal mapped surfaces, render multiple meshes and make the light sources dynamic.

And thanks to nvidia’s ShadowPlay I can even capture the Vulkan samples at nice frame rates, so I decided to upload a small video of the updated example to my YouTube channel:

Continue reading “Updated Vulkan deferred shading example video”

Updated Vulkan deferred shading example video

Khronos Chapter Munich Vulkan Slides


I’ve been speaking about my Vulkan launch day contributions and my experiences moving from OpenGL to Vulkan at the Khronos Munich Chapter Grand Opening last friday at the AMD offices. This was a great event, and finally getting to know some of the people in real was an awesome personal experience. So at this point I’d like to thank all the people that helped make this event happen and all these that attended, had a real blast talking and discussing about Vulkan!

For those interested, I have added my Slides to the Vulkan github repository.

Khronos Chapter Munich Vulkan Slides

Vulkan Examples update


The last few weeks since the Vulkan launch (one month ago) have been pretty busy. I’ve been adding new examples to to my github repository (almost at 30), fixed some bugs (thanks to everyone that has contributed!) and finally added Android support to all examples (removing the few separate Vulkan Android samples).

I also provide pre-built binaries for Windows, Linux and Android (only ARM right now) if you just want to try out the examples at :

Note : The windows binaries require the media pack (see below) to be present for loading shaders, meshes and textures.

64-Bit Binaries (2016-03-28) ~1.5 MBytes

Note : The linux binaries require the media pack (see below) to be present for loading shaders, meshes and textures.

64-Bit Binaries (2016-03-28) ~1.6 MBytes

Note :Requires a ARM device with Vulkan support. Gamepads are supported.
Assets required (shaders, textures, models) are part of each apk, the media pack is not requried.
The archive contains two batch files for easy installation and removal of all examples at once.

ARM Binaries (2016-03-28) ~51 MBytes

Note : This archive contains all shaders, models and textures requried to run the windows and linux examples. Put the data folder to where the bin folder for windows or linux has been extracted so the examples can find the required assets.

64-Bit Binaries (2016-03-28) ~20 MBytes

Vulkan Examples update

Vulkan is here!


Khronos finally launched Vulkan 1.0!

After 18 months of hard works and a huge industry-wide collaboration, this is a huge success. And this is not only an API-launch, but a hard launch with drivers for Vulkan from NVidia, AMD, Intel, etc. on mulitple platforms.

My launch contributions

Some time ago I was invited to be a part of the Vulkan Advisory Panel board. So I actually got a head-start and also released some Vulkan related stuff to the public on launch day. I even made it onto the Vulkan Launch page and was quoted in a press release by NVIDIA 🙂

Vulkan examples

You can find a bunch of Vulkan examples (C++) over at my github repository. They contain over two dozen examples, and even a few for getting started on Android (if you own Android hardware that supports Vulkan). Feel free to fork and contribute!

Vulkan hardware database

My OpenGL and OpenGL ES hardware database are frequently used (and quoted) by many developers, so I went on and also created a Vulkan Hardware Capability Database (and viewer). Vulkan is a bit more explicit than OpenGL and offers much more information, so once the database is filled with enough hardware reports this should become a valuable resource for developers.


Being part of this was a great experience, and I’d like to thank everybody on the Vulkan Working Group and Advisory panel, and the fine people over at LunarG and the IHVs I’ve worked with!

Vulkan is here!

Vulkan specification complete, release imminent


Great news! The Khronos Vulkan Working Group just announced that the specification is complete (and has entered the legal review process) and the release is imminent.

Though the initial time frame of 2015 was missed (by a bit), this should mean that Vulkan will be ready for launch in early 2016. This will include SDKs for all supported platforms, production ready drivers from several IHV, resources, tools, demos, examples and much more.

Continue reading “Vulkan specification complete, release imminent”