Updated Android vkQuake binaries

For those that want to test out my Android port of of Axel Gneiting’s vkQuake, I have released updates binaries at http://vulkan.gpuinfo.org/vkquake.php


Please note that the .apk does not contain any game files, so you need to get the .pak files from the shareware or registered version in order to play this. See the page above for details on this.

This release is based on vkQuake’s latest version and is pretty much feature complete. The only big thing missing for the Android port is sound, but other than that everything is there including multiplayer.

Also note that this version requires a gamepad to play and an Android device that supports Vulkan.

 

Vulkan Hardware Capability Viewer 1.2 released

I have released an update to the Vulkan Hardware Capability Viewer. The new version (1.2) adds support for os-specific surface capabilities that are added to the reports and online database.

This adds a new category to the tool and reports at the online database (for example this one) containing:

  • Surface properties (extents, usage flags, transforms, etc.)
  • Surface Formats (incl. color spaces)
  • Present modes

You can download the new version from http://vulkan.gpuinfo.org/download.php, downloads are available for Windows, Linux and Android (arm and x86).

The Android version (for now arm only) is now also available at the google playstore.

SPIR-V Extension for Visual Studio

vs2015

Source (C#) and download (VSIX for VS2015) can be found at https://github.com/SaschaWillems/SPIRV-VSExtension

With the launch of Vulkan, SPIR-V has been introduced as it’s binary shader format, replacing text based shader formats in favor of an intermediate representation. To make life a bit easier I have just released a Visual Studio (2015) extension that adds SPIR-V related commands to the context menu of shader files (and folders containing shader files):

contextmenufolder

This allows you got generate binary SPIR-V files from GLSL right out of your IDE. The commands use the glslang reference compiler for this and work on all file extensions supported by it.

The extension also parses errors generated if the shader does not compile and adds them to the error list of Visual Studio, so you can double click to jump to the file and line that the error occurred:

errorlist

The extension supports Vulkan and OpenGL semantics for generating the SPIR-V binary files, so if you happen to have a GPU and driver that supports SPIR-V for OpenGL you can generate binary shaders for OpenGL too. To get you started with SPIR-V for OpenGL I have released a simple C++ example that shows how to use SPIR-V with OpenGL.

As for Vulkan, SPIR-V is the only official (i.e. non-extension) source for loading shaders and is used in all of my C++ open source Vulkan examples.

Vulkan tip on rendering a fullscreen quad without buffers

fullscreentriangle_clipped

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.

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 https://github.com/SaschaWillems/vkQuake. 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). (more…)

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.


indirectdraw


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: 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. https://www.youtube.com/watch?v=8rNl4A0qGao  

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