ghostty
ghostty copied to clipboard
custom shader: add color scheme information to uniforms
// 256-color ANSI palette
uniform vec4 iPalette[256]; // palette 0-255
// Core terminal colors
uniform vec4 iBackgroundColor; // background
uniform vec4 iForegroundColor; // foreground
uniform vec4 iCursorColor; // cursor-color
[!NOTE] iCursorColor already technically already exists as iCurrentCursorColor, but it behaves differently than I would expect. Currently, when using this uniform it includes the opacity from
cursor-opacitybaked in. This proposal addsiCursorColoras the pure, un-modified color from the colorscheme, giving shader authors both options. When using shaders to replace the cursor entirely (withcursor-opacity = 0.0), having access to the original color value is essential.
Hi @mitchellh, I have raised a PR #9522 as a fix for this issue. Hope you give it a review. Thanks