Skip to content

Instantly share code, notes, and snippets.

@reshen
reshen / cursor_smear_fade.glsl
Last active September 24, 2025 21:03
Ghostty smooth fading trailing cursor
//
// Original version by KroneCorylus, ref https://github.com/KroneCorylus/shader-playground/blob/main/shaders/cursor_smear_fade.glsl
//
// Modifications:
// - Base the cursor trail color on the current cursor color, which can be configured
// in ghostty's config using `cursor-color`, ref https://ghostty.org/docs/config/reference#cursor-color
// - Cursor trail is partially transparent, which gives a nice fade effect
// - Cursor trail's maximum opacity is configurable using `TRAIL_MAX_OPACITY`
//