Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wt-crt-effect

English | 日本語

A HLSL pixel shader that make Windows Terminal look like a CRT (cathode-ray tube) monitor.

demo

Windows Terminal can load .hlsl pixel shaders per profile via the experimental.pixelShaderPath setting. This repository provides retro-style shaders built on that mechanism.

Requirements

  • Windows Terminal 1.6 or later (versions that support experimental.pixelShaderPath)
  • A GPU capable of running pixel shaders (any recent Windows PC is normally fine)

Installation

Option A: Bundled script (recommended)

Running the following in PowerShell automatically sets experimental.pixelShaderPath on the default profile in your settings.json (a backup is created beforehand).

# Apply the shader
./install.ps1

# Revert
./install.ps1 -Uninstall

Option B: Manual

  1. Open Windows Terminal, press Ctrl+, for Settings → "Open JSON file" at the bottom left.

  2. Add experimental.pixelShaderPath under profiles.defaults to apply it to all profiles at once — Windows PowerShell, Command Prompt, PowerShell (pwsh), WSL, etc. (adjust the path to your environment; escape \ as \\).

    {
        "profiles": {
            "defaults": {
                "experimental.pixelShaderPath": "C:\\path\\to\\wt-crt-effect\\shaders\\crt.hlsl"
            }
        }
    }

    To apply it to a single profile only, put the same line inside that profile in profiles.list instead. A per-profile setting overrides defaults.

  3. It takes effect immediately upon saving.

See settings-example.json for a minimal sample.

Customization

You can change the effect by editing the tunable parameters at the top of shaders/crt.hlsl. Windows Terminal reloads automatically when you save.

Parameter Description Default
FISHEYE_STRENGTH Fisheye bulge. 0 = flat, around 0.5 = strong sphere 0.06
ZOOM Shrink to compensate for edge clipping (0.851.0). Higher = narrower bezel 1.00
SCANLINE_STRENGTH Scanline intensity (higher = more pronounced) 0.80
SCANLINE_DENSITY Scanline density (smaller = thicker, more visible lines) 1.0
SCANLINE_DRIFT Time-varying scanline frequency; makes the moiré rings drift/breathe. 0 = static 0.02
SCANLINE_DRIFT_SPEED Speed of the breathing wobble. Lower = slower 0.04
SATURATION Saturation. 1 = unchanged, >1 = more vivid 1.65
MASK_STRENGTH Strength of the RGB vertical-stripe mask (0..1) 0.28
BLUR_AMOUNT Soft focus on the text. 0 = sharp, 1 = fully blurred 0.50
BLUR_RADIUS Blur kernel radius, in pixels 1.1
CHROMA_OFFSET Chromatic aberration (RGB shift) 0.0018
VIGNETTE_POWER Vignette strength 0.22
VIGNETTE_MIN Brightness floor at the edges (higher = brighter, more readable) 0.70
FLICKER_AMOUNT Brightness flicker 0.03
GRAIN_AMOUNT Film noise amount 0.06
BLOOM_AMOUNT Phosphor glow (bleed) 0.45
BRIGHTNESS Overall brightness compensation 1.32
SCREEN_GRAY Screen black level. 0 = pure black background, higher = grayer 0.05

To weaken the fisheye, lower FISHEYE_STRENGTH (e.g. 0.15); set it to 0 to make the screen flat.

Appendix: Recommended combination

The author likes pairing this with the pure theme of oh-my-posh. A simple prompt goes well with the CRT effect and brings out the retro terminal atmosphere.

Add the following to your PowerShell profile ($PROFILE):

oh-my-posh init pwsh --config 'pure' | Invoke-Expression

If oh-my-posh is not installed, you can get it via winget install JanDeDobbeleer.OhMyPosh or similar. See the oh-my-posh documentation for details.

demo2

License

MIT

About

Retro CRT pixel shaders for Windows Terminal.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages