braindigitalis / windows-terminal-shaders

A small collection of terminal shaders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows Terminal Shaders

Shaders for the new Windows Terminal

How to use

  • Checkout the repository
  • Set the value for experimental.pixelShaderPath in your terminal setting to the desired shader
  • optional: Add keybindings for turning the shader on/off and focusmode

Example Setting

Please add the lines you need to your own config, this example config only show the values that you need to add.

{
  "profiles": {
    "defaults": {
      // Add your desired shader
      "experimental.pixelShaderPath": "C:\\gitrepos\\windows-terminal-shaders\\crt.hlsl"
    },
  },
  "keybindings": [
    // It's recommended to add those two toggles for ease of use
    {
      "command": "toggleFocusMode",
      "keys": "shift+f11"
    },
    {
      "command": "toggleShaderEffects",
      "keys": "shift+f10"
    }
  ]
}

Preview

crt1 crt1 crt1
Default Green Monochrome Ember Monochrome

Settings

#define GRAIN_INTENSITY 0.02
#define TINT_COLOR float4(1, 0.7f, 0, 0)
#define ENABLE_SCANLINES 1
#define ENABLE_REFRESHLINE 1
#define ENABLE_NOISE 1
#define ENABLE_CURVE 1
#define ENABLE_TINT 0
#define DEBUG 0

Turn a specific color into transparent for use with useAcrylic and acrylicOpacity when xterm colors are enabled, like in vim themes.

Preview

transparent not show transparent applie
xterm colors without shader xterm colors with shader

Settings

Set the color value for the chromaKey used for transparency float3(8.0f / 0xFF, 8.0f / 0xFF, 8.0f / 0xFF) is the same as rgb(8, 8, 8)

static const float3 chromaKey = float3(8.0f / 0xFF, 8.0f / 0xFF, 8.0f / 0xFF);

Changes the hue of screen colors. This can apply a color correction similar to the tint knob of old TVs or it can be set to cycle the colors smoothly over time.

Preview

hueshift not applied hueshift applied
vintage colors without shader vintage colors with shader

Settings

HUE_OFFSET [0.0, 1.0)f : Adjust the hue to a specific offset.
CHANGE_RATE [0.0, 1.0)f : Changes the hue over time. For small values like 0.01f, this will cause a slow change over time and probably won't be very disruptive. TOLERANCE [0.0, 1.0)f : Saturation% setpoint. All saturation levels greater or equal than this will be affected by the hue adjustments. This allows you to fix some of the grayscale colors such as those offten used by on-screen text.

#define HUE_OFFSET 0.0f
#define CHANGE_RATE 0.01f
#define TOLERANCE 0.266f

About

A small collection of terminal shaders

License:Creative Commons Zero v1.0 Universal


Languages

Language:Shell 92.9%Language:HLSL 7.1%