custom shader: add color scheme information to uniforms
Add new shader uniforms to provide access to terminal color scheme:
- iPalette[256]: 256-color ANSI palette array
- iBackgroundColor: terminal background color
- iForegroundColor: terminal foreground color
- iCursorColor: pure cursor color (without opacity)
The new iCursorColor uniform provides the unmodified cursor color from the colorscheme, while existing iCurrentCursorColor retains the opacity-modified version. This enables shader authors to create sophisticated theme-aware effects and replace cursors entirely.
Color uniforms are populated per-frame when terminal colors change, including dynamic updates via OSC sequences. All uniforms use normalized float values (0.0-1.0) with RGB components.
The tests in this PR were written primarily by Claude Code.
Fixes #9417
Is this PR AI-assisted? It's okay if it is, we just ask that you disclose that fact if so. (See CONTRIBUTING.md.)
Tests are written by agent. Let me disclose this in description. Thanks for pointing out.
Should we really be trying to update the palette every single frame for this? Maybe this would be better to do on a config reload or an OSC sequence? I suppose bg_color is updated every frame so maybe this isn't actually such a big deal.
Still seems kind of wasteful. Maybe some way of marking the colors as dirty would be a better approach
#9656