Physically based rendering and moving (hdr) assets out of the repository

The last days (and weeks) I’ve been working on a Vulkan example implementing physically based rendering with image based lighting (you can find a nice article with lots of details over at Trent Reed’s blog) and just pushed it to my public github repository.

  

While working on this demo I realized that putting all the binary assets (models and esp. textures) in the repository might not have been a great idea. They quickly bloat the size of the repository and once a binary asset is there you won’t be able to completely remove it (to shrink the repo again) unless you actually rewrite the history. But with the repository being public with almost 400 forks and numerous pull requests this pretty much a no-go.

Continue reading “Physically based rendering and moving (hdr) assets out of the repository”

Physically based rendering and moving (hdr) assets out of the repository

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.

 

Updated Android vkQuake binaries

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.

Vulkan Hardware Capability Viewer 1.2 released

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.

SPIR-V Extension for Visual Studio

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.

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 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).

Continue reading “Porting (Vulkan)Quake to Android”

Video

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: Indirect drawing