ForumPlayer / kwin-effect-shaders

Desktop effect for KDE Plasma to apply GLSL shaders. Alternative to vkBasalt or ReShade when they are unsupported.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KWin Effect Shaders

KDE Plasma plugin aimed at adding post processing effects to video games using GLSL shaders.
Example of FakeHDR and Adaptive Sharpen in Life is Strange 2: Comparison

Usage

Requirements

KWin compositing with GLSL 1.40 or higher for OpenGL or GLSL 3.0 or higher for OpenGL ES.

Dependencies

  • Arch Based (untested):

    sudo pacman -Syu extra-cmake-modules kwin kf5
    
  • Debian Based (untested):

    sudo apt install git g++ cmake extra-cmake-modules libkf5kio-dev libkf5globalaccel-dev libkf5i18n-dev kwin-dev gettext qttools5-dev kinit-dev kwin-de
    
  • Fedora Based (untested):

    sudo dnf install git gcc-c++ cmake extra-cmake-modules kf5-kio-devel kf5-kglobalaccel-devel kf5-ki18n-devel kwin-devel qt5-qttools-devel qt5-qttools-static qt5-qtbase-devel
    
  • OpenSUSE Based (tested):

    sudo zypper in git gcc-c++ cmake extra-cmake-modules kio-devel kglobalaccel-devel ki18n-devel kwin5-devel
    

Installing

NOTE: After installing, log out and in of the session to load the plugin.
If the plugin does not load, see Enabling or Disabling The Plugin.

From Source:

git clone https://github.com/kevinlekiller/kwin-effect-shaders
cd kwin-effect-shaders
# Use the install.sh script:
./install.sh

Arch (AUR):

https://aur.archlinux.org/packages/kwin-effect-shaders-git

Uninstalling

./install.sh UNINSTALL

Acquiring The Shader Files

NOTE: If you have ran the install.sh script, everything within this section is done automatically.

Clone the shader files to somewhere in your home directory:

git clone https://github.com/kevinlekiller/kwin-effect-shaders_shaders ~/.local/share/kwin-effect-shaders_shaders

If you use the aforementioned default location for the shaders, it will be automatically detected.
If you use a custom location, set the Shader Path:
By modifying the configuration file at ~/.config/kevinlekiller/kwin_effect_shaders.conf
Or by setting it in the configuration UI.

Keyboard Shortcuts

NOTE: The keyboard shortcuts might be disabled by default.

To change them:
System Settings -> Workspace -> Shortcuts -> Shortcuts -> System Services -> KWin

Modifying keyboard shortcuts

Modifying The Shader Settings

GUI

Using the GUI is recommended. https://github.com/kevinlekiller/kwin-effect-shaders_gui

GUI

Manually

Open the 1_settings.glsl file in a text editor. By default 1_settings.glsl is in ~/.local/share/kwin-effect-shaders_shaders
If it does not exist, copy 1_settings.glsl.example to 1_settings.glsl
You can force the new shader settings using the keyboard shortcut.

Shader Settings

Enabling or Disabling The Plugin

To enable or disable the plugin:
System Settings -> Workspace -> Workspace Behavior -> Desktop Effects -> Appearance -> Shaders
Toggle the checkmark in the box and click Apply.

Toggling the plugin

Notes

Note that X11 disables compositing in full screen applications, use Wayland if possible.

This project was initially created because some games do not support vkBasalt or ReShade.

This plugin is a fork of these projects: kwin-effect-smart-invert, invert, kwin-effects-yet-another-magic-lamp.

I'm not an expert on OpenGL or glsl, if you are, PR's are welcome.

Antialiasing alternatives:
If you have a AMD gpu, see the gallium documentation.
ex. on Steam game: pp_jimenezmlaa_color=32 %command%

TODO

Try to have each shader run on its own, which would solve some issues. -> Currently my knowledge of OpenGL is limited, from what I can understand, this requires creating / using frame and vertex buffer objects. See issue #3.

Screenshots

About

Desktop effect for KDE Plasma to apply GLSL shaders. Alternative to vkBasalt or ReShade when they are unsupported.

License:GNU General Public License v2.0


Languages

Language:C++ 82.0%Language:Shell 11.2%Language:CMake 6.8%