All Projects → DadSchoorse → Vkbasalt

DadSchoorse / Vkbasalt

Licence: zlib
a vulkan post processing layer for linux

Programming Languages

cplusplus
227 projects

Projects that are alternatives of or similar to Vkbasalt

Pmtech
Lightweight, multi-platform, data-oriented game engine.
Stars: ✭ 478 (-7.54%)
Mutual labels:  glsl, vulkan
makma
Makma is a deferred Vulkan renderer written in C++.
Stars: ✭ 77 (-85.11%)
Mutual labels:  vulkan, glsl
YALCT
Yet Another Live Coding Tool - Powered by Veldrid and elbow grease
Stars: ✭ 25 (-95.16%)
Mutual labels:  vulkan, glsl
pilka
Another live-coding tool for creating shader demos, Vulkan+Wgpu powered.
Stars: ✭ 84 (-83.75%)
Mutual labels:  vulkan, glsl
Vkhr
Real-Time Hybrid Hair Rendering using Vulkan™
Stars: ✭ 353 (-31.72%)
Mutual labels:  glsl, vulkan
sph vulkan
SPH simulation in Vulkan compute shader.
Stars: ✭ 29 (-94.39%)
Mutual labels:  vulkan, glsl
MoravaEngine
2D/3D graphics engine written in C++ language. It currently supports the following graphics APIs: OpenGL 3.3+, Vulkan 1.2, DirectX 11. Its current purpose is to experiment with various CG concepts and techniques.
Stars: ✭ 129 (-75.05%)
Mutual labels:  vulkan, glsl
Crossshader
⚔️ A tool for cross compiling shaders. Convert between GLSL, HLSL, Metal Shader Language, or older versions of GLSL.
Stars: ✭ 113 (-78.14%)
Mutual labels:  glsl, vulkan
Vuh
Vulkan compute for people
Stars: ✭ 264 (-48.94%)
Mutual labels:  glsl, vulkan
VulkanRenderer
Personal repo for learning the vulkan graphics api
Stars: ✭ 42 (-91.88%)
Mutual labels:  vulkan, glsl
Graphicsfuzz
A testing framework for automatically finding and simplifying bugs in graphics shader compilers.
Stars: ✭ 448 (-13.35%)
Mutual labels:  glsl, vulkan
Flexengine
Cross-platform game engine with Vulkan backend
Stars: ✭ 452 (-12.57%)
Mutual labels:  glsl, vulkan
Reshade
A generic post-processing injector for games and video software.
Stars: ✭ 2,285 (+341.97%)
Mutual labels:  glsl, vulkan
Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (-54.55%)
Mutual labels:  vulkan, glsl
Shaderc Rs
Rust bindings for the shaderc library.
Stars: ✭ 143 (-72.34%)
Mutual labels:  glsl, vulkan
CPP-Programming
Various C/C++ examples. DirectX, OpenGL, CUDA, Vulkan, OpenCL.
Stars: ✭ 30 (-94.2%)
Mutual labels:  vulkan, glsl
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+2162.67%)
Mutual labels:  glsl, vulkan
Vrt
🔅 Ray tracing library for Vulkan API (indev)
Stars: ✭ 111 (-78.53%)
Mutual labels:  glsl, vulkan
SFE-Engine
A real time renderer based on Vulkan(LWJGL).
Stars: ✭ 20 (-96.13%)
Mutual labels:  vulkan, glsl
Shadergen
Proof-of-concept library for generating HLSL, GLSL, and Metal shader code from C#,
Stars: ✭ 395 (-23.6%)
Mutual labels:  glsl, vulkan

vkBasalt

vkBasalt is a Vulkan post processing layer to enhance the visual graphics of games.

Currently, the build in effects are:

  • Contrast Adaptive Sharpening
  • Denoised Luma Sharpening
  • Fast Approximate Anti-Aliasing
  • Enhanced Subpixel Morphological Anti-Aliasing
  • 3D color LookUp Table

It is also possible to use Reshade Fx shaders.

Disclaimer

This is one of my first projects ever, so expect it to have bugs. Use it at your own risk.

Building from Source

Dependencies

Before building, you will need:

  • GCC >= 9
  • X11 development files
  • glslang
  • SPIR-V Headers
  • Vulkan Headers

Building

These instructions use --prefix=/usr, which is generally not recommened since vkBasalt will be installed in directories that are meant for the package manager. The alternative is not setting the prefix, it will then be installed in /usr/local. But you need to make sure that ld finds the library since /usr/local is very likely not in the default path.

In general, prefer using distro provided packages.

git clone https://github.com/DadSchoorse/vkBasalt.git
cd vkBasalt

64bit

meson --buildtype=release --prefix=/usr builddir
ninja -C builddir install

32bit

Make sure that PKG_CONFIG_PATH=/usr/lib32/pkgconfig and --libdir=lib32 are correct for your distro and change them if needed. On Debian based distros you need to replace lib32 with lib/i386-linux-gnu, for example.

ASFLAGS=--32 CFLAGS=-m32 CXXFLAGS=-m32 PKG_CONFIG_PATH=/usr/lib32/pkgconfig meson --prefix=/usr --buildtype=release --libdir=lib32 -Dwith_json=false builddir.32
ninja -C builddir.32 install

Packaging status

Fedora sudo dnf install vkBasalt

Void Linux sudo xbps-install vkBasalt

Usage

Enable the layer with the environment variable.

Standard

When using the terminal or an application (.desktop) file, execute:

ENABLE_VKBASALT=1 yourgame

Lutris

With Lutris, follow these steps below:

  1. Right click on a game, and press configure.
  2. Go to the System options tab and scroll down to Environment variables.
  3. Press on Add, and add ENABLE_VKBASALT under Key, and add 1 under Value.

Steam

With Steam, edit your launch options and add:

ENABLE_VKBASALT=1 %command% 

Configure

Settings like the CAS sharpening strength can be changed in the config file. The config file will be searched for in the following locations:

  • a file set with the environment variableVKBASALT_CONFIG_FILE=/path/to/vkBasalt.conf
  • vkBasalt.conf in the working directory of the game
  • $XDG_CONFIG_HOME/vkBasalt/vkBasalt.conf or ~/.config/vkBasalt/vkBasalt.conf if XDG_CONFIG_HOME is not set
  • $XDG_DATA_HOME/vkBasalt/vkBasalt.conf or ~/.local/share/vkBasalt/vkBasalt.conf if XDG_DATA_HOME is not set
  • /etc/vkBasalt.conf
  • /etc/vkBasalt/vkBasalt.conf
  • /usr/share/vkBasalt/vkBasalt.conf

If you want to make changes for one game only, you can create a file named vkBasalt.conf in the working directory of the game and change the values there.

Reshade Fx shaders

To run reshade fx shaders e.g. shaders from the reshade repo, you have to set reshadeTexturePath and reshadeIncludePath to the matching dirctories from the repo. To then use a specific shader you need to set a custom effect name to the shader path and then add that effect name to effects like every other effect.

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

Ingame Input

The HOME key can be used to disable and re-enable the applied effects, the key can also be changed in the config file. This is based on X11 so it won't work on pure wayland. It should however at least not crash without X11.

Debug Output

The amount of debug output can be set with the VKBASALT_LOG_LEVEL env var, e.g. VKBASALT_LOG_LEVEL=debug. Possible values are: trace, debug, info, warn, error, none.

By default the logger outputs to stderr, a file as output location can be set with the VKBASALT_LOG_FILE env var, e.g. VKBASALT_LOG_FILE="vkBasalt.log".

FAQ

Why is it called vkBasalt?

It's a joke: vulkan post processing → after vulcan → basalt

Does vkBasalt work with dxvk and vkd3d?

Yes.

Will vkBasalt get me banned?

Maybe. To my knowledge this hasn't happened yet but don't blame me if your frog dies.

Will there be a openGl version?

No. I don't know anything about openGl and I don't want to either. Also openGl has no layer system like vulkan.

Will there be a GUI in the future?

Maybe, but not soon.

So is vkBasalt just a reshade port for linux?

Not really, most of the code was written from scratch. vkBasalt directly uses reshade source code for the shader compiler (thanks @crosire), but that's about it.

Does every reshade shader work?

No. Shaders that need multiple techniques do not work, there might still be problems with stencil and blending and depth buffer access isn't ready yet.

You said that "depth buffer access isn't ready yet", what does this mean?

There is a wip version that you can enable with depthCapture = on. It will lead to many problems especially on non nvidia hardware. Also the selected depth buffer isn't always the one you would want.

Is there a way to change settings for reshade shaders?

There is some support for it #46. One easy way so to simply edit the shader file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].