ghostty icon indicating copy to clipboard operation
ghostty copied to clipboard

custom shaders: add colorscheme information to shader uniforms

Open ClearAspect opened this issue 2 months ago • 0 comments

#9417 Adds palette and color scheme uniforms to custom shaders, allowing custom shaders to access terminal color information:

  • iPalette[256]: Full 256-color terminal palette (RGB)
  • iBackgroundColor, iForegroundColor: Terminal colors (RGB)
  • iCursorColor, iCursorText: Cursor colors (RGB)
  • iSelectionBackgroundColor, iSelectionForegroundColor: Selection colors (RGB)

Colors are normalized to [0.0, 1.0] range and update when the palette changes via OSC sequences or configuration changes. The palette_dirty flag tracks when colors need to be refreshed, initialized to true to ensure correct colors on new surfaces.

ClearAspect avatar Nov 20 '25 21:11 ClearAspect