Skip to content

Instantly share code, notes, and snippets.

@reactorcoremeltdown
Created December 26, 2025 11:18
Show Gist options
  • Select an option

  • Save reactorcoremeltdown/2ad67cc107f803e5169f3a64f0340cd8 to your computer and use it in GitHub Desktop.

Select an option

Save reactorcoremeltdown/2ad67cc107f803e5169f3a64f0340cd8 to your computer and use it in GitHub Desktop.
VT320-alike amber glow GL shader for ghostty, based on https://github.com/0xhckr/ghostty-shaders/blob/main/retro-terminal.glsl
// Original shader collected from: https://www.shadertoy.com/view/WsVSzV
// Licensed under Shadertoy's default since the original creator didn't provide any license. (CC BY NC SA 3.0)
// Slight modifications were made to give a green-ish effect.
float warp = 0.0; // simulate curvature of CRT monitor
float scan = 0.50; // simulate darkness between scanlines
void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
// squared distance from center
vec2 uv = fragCoord / iResolution.xy;
vec2 dc = abs(0.5 - uv);
dc *= dc;
// warp the fragment coordinates
uv.x -= 0.5; uv.x *= 1.0 + (dc.y * (0.3 * warp)); uv.x += 0.5;
uv.y -= 0.5; uv.y *= 1.0 + (dc.x * (0.4 * warp)); uv.y += 0.5;
// sample inside boundaries, otherwise set to black
if (uv.y > 1.0 || uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0)
fragColor = vec4(0.0, 0.0, 0.0, 1.0);
else
{
// determine if we are drawing in a scanline
float apply = abs(sin(fragCoord.y) * 0.5 * scan);
// sample the texture and apply a teal tint
vec3 color = texture(iChannel0, uv).rgb;
vec3 tint = vec3(1.0, 0.74, 0.2); // teal color (slightly more green than blue)
// mix the sampled color with the teal tint based on scanline intensity
fragColor = vec4(mix(color * tint, vec3(0.0), apply), 1.0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment