vkBasalt is a Vulkan post-processing layer for improving the visuals of games. Expect bugs from it as it is one of my first projects. Use it at your own risk.
Currently, the built-in effects are:
- 3D color lookup table
- Contrast Adaptive Sharpening
- Denoised Luma Sharpening
- Enhanced Subpixel Morphological Anti-Aliasing
- Fast Approximate Anti-Aliasing
It is also possible to use ReShade FX shaders.
sudo apt install vkbasalt
sudo dnf install vkBasalt
sudo xbps-install vkBasalt
You can enable the layer with an environment variable.
Follow these steps with Lutris:
- Right-click a game and click
Configure
. - Go to the
System options
tab and scroll down toEnvironment variables
. - Click
Add
and addENABLE_VKBASALT
underKey
and1
underValue
.
When using the terminal or an application (.desktop) file, run:
ENABLE_VKBASALT=1 yourgame
With Steam, edit your launch options and add:
ENABLE_VKBASALT=1 %command%
Settings, like the CAS sharpness amount, can be changed in the config file.
The config file will be searched for in the locations:
$XDG_CONFIG_HOME/vkBasalt/vkBasalt.conf
or~/.config/vkBasalt/vkBasalt.conf
ifXDG_CONFIG_HOME
is not set$XDG_DATA_HOME/vkBasalt/vkBasalt.conf
or~/.local/share/vkBasalt/vkBasalt.conf
ifXDG_DATA_HOME
is not set/etc/vkBasalt.conf
/etc/vkBasalt/vkBasalt.conf
/usr/share/vkBasalt/vkBasalt.conf
- A file set with the environment variable
VKBASALT_CONFIG_FILE=/path/to/vkBasalt.conf
vkBasalt.conf
in the game's working directory
You can create a file named vkBasalt.conf
in the game's working directory and change the values there if you want to make changes for only one game.
You must set reshadeTexturePath
and reshadeIncludePath
to the matching directories from the repository to run ReShade FX shaders, like shaders from the ReShade repository. You must set a custom effect name to the shader path then add that effect name to effects
like every other effect to use a specific shader.
effects = colorfulness:denoise
colorfulness = /home/user/reshade-shaders/Shaders/Colourfulness.fx
denoise = /home/user/reshade-shaders/Shaders/Denoise.fx
reshadeTexturePath = /home/user/reshade-shaders/Textures
reshadeIncludePath = /home/user/reshade-shaders/Shaders
The Home key can be used to toggle the applied effects. The key can also be changed in the config file. It will not work on pure Wayland as it is based on X11, but should not crash without X11.
The amount of debug output can be set with the VKBASALT_LOG_LEVEL
environment variable, like VKBASALT_LOG_LEVEL=debug
. Valid values are: trace, debug, info, warn, error, none
.
The logger outputs to stderr by default. A file as output location can be set with the VKBASALT_LOG_FILE
environment variable, like VKBASALT_LOG_FILE="vkBasalt.log"
.
Before building, you will need:
- GCC ≥ 9
- glslang
- SPIR-V headers
- Vulkan headers
- X11 development files
These instructions use --prefix=/usr
, that is not recommended in general as vkBasalt will be installed in directories that are meant for the package manager. An alternative is not setting the prefix, so it will be installed in /usr/local
. But you must ensure the ld
finds the library; /usr/local is probably not in the default path.
Prefer to use distro-provided packages in general.
git clone https://github.com/DadSchoorse/vkBasalt.git
cd vkBasalt
Ensure the PKG_CONFIG_PATH=/usr/lib32/pkgconfig
and --libdir=lib32
are right for your distro and change them if needed. E.g., you must replace lib32
by lib/i386-linux-gnu
on Debian-based distros.
ASFLAGS=--32 CFLAGS=-m32 CXXFLAGS=-m32 PKG_CONFIG_PATH=/usr/lib32/pkgconfig meson setup --prefix=/usr --buildtype=release --libdir=lib32 -Dwith_json=false builddir.32
ninja -C builddir.32 install
meson setup --buildtype=release --prefix=/usr builddir
ninja -C builddir install
It is a joke: Vulkan post-processing → after vulcan → basalt.
Yes.
Maybe. It has not happened yet to my knowledge, but do not blame me if your frog dies.
No. I do not know anything about OpenGL and I do not want to either. Also, OpenGL has no layer system like Vulkan.
Maybe, but not soon.
Not really. The code was mostly written from scratch. vkBasalt directly uses ReShade source code for the shader compiler (thanks @crosire), but that is about it.
No. Depth buffer access is not ready yet, shaders that need many techniques do not work and there might still be issues with blending and stencil.
There is a WIP version you can enable with depthCapture = on
. It will cause many issues especially on non-Nvidia hardware. Also, the chosen depth buffer is not always the one wanted.
There is some support for it #46. An easy way to do it is to simply edit the shader file.