Docs / Getting Started / Shaders

🔗Shaders

Boxxy includes a built-in GPU shader engine compatible with drop-in Ghostty and Shadertoy .glsl fragment shaders. Layer animated backdrops behind razor-sharp native text, apply full-terminal CRT and phosphor bloom post-processing, or add event-driven cursor trails that sleep at 0% GPU when you stop typing.

Zero overhead when off: While shaders are disabled, Boxxy allocates zero OpenGL contexts, zero framebuffers, and zero animation timers.


🔗Enabling & Configuring Shaders

  1. Open =Preferences= (Ctrl+,) → =Shaders= and turn on Enable Terminal Shaders.
  2. Choose any combination of:
    • Background and Post-Process — your primary backdrop or full-terminal filter.
    • Chained Second Pass — an optional second pass that receives Pass 1's output on iChannel0.
    • Cursor Effect — an event-driven cursor trail, glow, or keystroke ripple.
  3. Adjust any live sliders, switches, or color pickers under Shader Controls — uniform updates stream directly to the GPU without recompiling.

You can also toggle or reload shaders anytime from the Command Palette (Ctrl+Shift+P):


🔗Built-in Shaders

Boxxy ships with 10 built-in presets ready to use out of the box:

🔗Background Shaders (crisp native text on top)

ShaderDescriptionCadence
Boxxy AuroraTheme-reactive aurora ribbons harmonized with Boxxy's 3-color triadAnimated
Deep StarfieldMulti-layer parallax starfield that glides smoothly as you scrollAnimated
Cyber GridRetrowave perspective horizon grid that pulses softly on keystrokesAnimated
Analog Film GrainSubtle monochrome grain texture for warm analog depthAnimated

🔗Post-Process Shaders (full terminal via iChannel0)

ShaderDescriptionCadence
CRT ClassicCurved glass CRT filter with scanlines, subtle RGB mask, and phosphor persistenceAnimated
Phosphor BloomSoft glowing bloom around bright syntax-highlighted textStatic (0% idle GPU)
Command GlitchOSC 133 shell-reactive chromatic glitch burst when a command exits with an errorEvent-Driven

🔗Cursor Shaders (0% GPU when idle)

ShaderDescriptionCadence
Cursor BlazeSmooth Ghostty-style directional comet trail when jumping across lines or wordsEvent-Driven
Cursor GlowSoft ambient halo around the active cursor that pulses gently on keystrokesEvent-Driven
Cursor RippleExpanding ring ripple triggered whenever the cursor jumps or you typeEvent-Driven

🔗Execution Stages & Power Saving

Boxxy runs shaders in two distinct rendering stages so you never have to trade text clarity for visual flair:

To keep laptops cool and quiet, Boxxy automatically gates animation ticks:


🔗Custom Shaders (Ghostty & Shadertoy)

Drop any .glsl fragment shader defining void mainImage(out vec4 fragColor, in vec2 fragCoord) into:

~/.config/boxxy-terminal/shaders/

(Click Open Shaders Folder in =Preferences= → =Shaders= to open it directly.) With Live Hot-Reload enabled, saving edits to any .glsl file automatically recompiles and updates every open terminal pane.

🔗Optional Metadata & Live Preferences Controls

Plain Ghostty and Shadertoy shaders work unmodified. To give your custom shader a friendly name, description, and live interactive controls in =Preferences= → =Shaders=, add an optional /*! boxxy-shader ... */ TOML header and // control comments right above your uniform declarations:

/*! boxxy-shader
name = "Ocean Drift"
author = "You"
description = "Calm theme-tinted wave backdrop behind terminal text."
category = "background"  # "background" | "postprocess" | "cursor"
mode = "background"      # "background" | "full_content"
animation = "continuous" # "static" | "continuous" | "on_event"

[defaults]
brightness = 0.35
channel0 = "builtin://noise/fbm-256"

[defaults.uniforms]
uWaveSpeed = 0.8
uMatchTheme = true
uTint = "#7DC4E4"
*/

// control slider min=0.1 max=3.0 step=0.05 label="Wave Speed"
uniform float uWaveSpeed;

// control checkbox label="Match Boxxy Theme Accent"
uniform bool uMatchTheme;

// control color label="Custom Tint"
uniform vec3 uTint;

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = fragCoord / max(iResolution.xy, vec2(1.0));
    float n = texture(iChannel0, uv * 0.8 + vec2(iTime * uWaveSpeed * 0.1, 0.0)).r;
    vec3 tint = uMatchTheme ? iBoxxyAccentColor.rgb : uTint;
    vec3 col = mix(iBackgroundColor.rgb, iBackgroundColor.rgb + tint * 0.45, n);
    fragColor = vec4(clamp(col, vec3(0.0), vec3(1.0)), iBackgroundColor.a);
}

Supported // control widgets:

Built-in procedural tileable noise textures can be bound to channel0–channel3 without external image files: builtin://noise/value-128, builtin://noise/value-256, builtin://noise/fbm-256, builtin://noise/fbm-512, and builtin://noise/cellular-256.

🔗Supported Uniforms


🔗Create Shaders with BoxxyClaw

Don't want to hand-write GLSL from scratch? Enable the built-in Boxxy Shader Creator skill in =Preferences= → =Skills=, open the =BoxxyClaw= drawer (Ctrl+/), and describe the effect you want. Your character will write a validated .glsl shader with live Preferences sliders straight into your shaders folder.

Try asking: "Create a subtle matrix rain background shader that reacts to my Boxxy theme colors and lets me tune speed and density."


🔗CLI Tools

List all discovered shaders or validate custom .glsl files directly from the command line (checks both OpenGL 3.3 Core and OpenGL ES 3.0 compilation):

# List all built-in and custom shaders with status and cadence
boxxy-terminal +shader list

# Validate all shaders in your shaders folder
boxxy-terminal +shader lint

# Lint a specific .glsl file
boxxy-terminal +shader lint ~/.config/boxxy-terminal/shaders/ocean_drift.glsl