Vulkan progress report #6
By: Juan Linietsky 28 January 2020
It's been a while since the previous progress report, as I went on vacation in November (did not take a vacation in years...), and December I had a lot of other engine related tasks that piled up that I had to solve. Work on the Vulkan branch resumed at the beginning of January and significant progress was made already.
While it more or less retains the functionality from Godot 3.x, the post-process stack was rewritten anew and modernized. It still lacks a few minor details (like colorspace adjustment via 3D textures) but it's mostly there.
Thanks to the ability to use Compute, the luminance reduction code that is required for auto-exposure was rewritten using parallel reduction. This results in faster and more accurate luminance determination from the scene.
While this seems like black magic at first, it eventually makes a good amount of sense and shows the power of the optimizations that can be done using compute. This implementation was written using Vulkan Compute.
As always, huge thanks to Matias Goldberg for pointing me towards the right direction.
Rewritten glow / bloom
The glow and bloom code was rewritten. It was working well already in Godot 3.x, so not a lot has changed.
The main addition is a new Mix mode which, while probably not entirely physically correct, makes it easier for artists to use this effect and obtain visually pleasing results.
New depth of field effect
There is a new depth of field (DOF) effect available. It is considerably faster and better looking than the one present in Godot 3.x. By default, it uses an approximated hexagonal Bokeh shape, with an optional (but more expensive) circular one for higher end devices.
New screen space ambient occlusion
The screen space ambient occlusion (SSAO) effect has been ported from Godot 3.x, with some changes to increase its quality. Besides now having been rewritten to use Compute, it also supports rendering to half resolution (a very requested feature by users, given SSAO in Goot 3.x is considerably expensive). When this is enabled, the occlusion is upscaled using a smart filter that preserves edges, so the quality loss is much less noticeable.
Given that Godot does not use TAA (temporal anti-aliasing), and it probably never will (due to the huge burden that it means for the users of a general purpose game engine to handle motion vectors in their shaders), reducing specular aliasing needs to be done via alternate means.
Due to this, it is now possible to associate a roughness texture with a normal texture, which will adjust roughness based on normal mipmap variance. Godot auto-detects the use of both textures in a shader and it automatically fixes the roughness texture (although it can be done manually too).
As this is not always the case, and games not always use either of them, it is possible to enable this as a post-process effect too.
The plan is to finish, in February, the features that are missing to be ported from Godot 3.x. This includes subsurface scattering (will include a more correct human skin mode), and screen space reflections. Afterwards, all the new planned features and optimizations will finally be implemented!
As always, please keep in mind Godot is developed with love for all of you, so you have a completely free and open tool to make your games, and make them entirely yours. This could never happen without generous donations from our patrons, so if you are not yet, please consider becoming one.