···11+// Original shader collected from: https://www.shadertoy.com/view/WsVSzV
22+// Licensed under Shadertoy's default since the original creator didn't provide any license. (CC BY NC SA 3.0)
33+// Slight modifications were made to give a green-ish effect.
44+55+// This shader was modified by April Hall (arithefirst)
66+// Sourced from https://github.com/m-ahdal/ghostty-shaders/blob/main/retro-terminal.glsl
77+// Changes made:
88+// - Removed tint
99+// - Made the boundaries match ghostty's background color
1010+1111+float warp = 0.25; // simulate curvature of CRT monitor
1212+float scan = 0.50; // simulate darkness between scanlines
1313+1414+void mainImage(out vec4 fragColor, in vec2 fragCoord)
1515+{
1616+ // squared distance from center
1717+ vec2 uv = fragCoord / iResolution.xy;
1818+ vec2 dc = abs(0.5 - uv);
1919+ dc *= dc;
2020+2121+ // warp the fragment coordinates
2222+ uv.x -= 0.5; uv.x *= 1.0 + (dc.y * (0.3 * warp)); uv.x += 0.5;
2323+ uv.y -= 0.5; uv.y *= 1.0 + (dc.x * (0.4 * warp)); uv.y += 0.5;
2424+2525+ // determine if we are drawing in a scanline
2626+ float apply = abs(sin(fragCoord.y) * 0.25 * scan);
2727+2828+ // sample the texture
2929+ vec3 color = texture(iChannel0, uv).rgb;
3030+3131+ // mix the sampled color with the scanline intensity
3232+ fragColor = vec4(mix(color, vec3(0.0), apply), 1.0);
3333+}