Files
absolute-dotfiles/.config/ghostty/shaders/glow.glsl
David Ibia f7bd72184b fix(colorscheme): update theme name from "catppuccin-mocha" to "Catppuccin Frappe"
feat(shaders): add CRT-styled shader with public domain license and adjustments for Ghostty, including parameter definitions and tonal control functions.

refactor(shader): optimize color conversion and output to SRGB for better visual quality

feat(shaders): add flicker, glow, and starfield shader effects for terminal ambiance.
2025-11-09 14:17:03 +01:00

23 lines
635 B
GLSL

// https://github.com/12jihan/ghostty_shaders/blob/main/glow.glsl
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord/iResolution.xy;
// Base color from terminal
vec3 color = texture(iChannel0, uv).rgb;
// Add bloom/glow
float bloom = 0.05;
vec3 glow = vec3(0.0);
for(float i = 0.0; i < 4.0; i++) {
vec2 offset = vec2(i) / iResolution.xy;
glow += texture(iChannel0, uv + offset).rgb;
glow += texture(iChannel0, uv - offset).rgb;
}
// Combine glow with original color
color += glow * bloom;
fragColor = vec4(color, 1.0);
}