Skip to content

custom shader: add color scheme information to uniforms #9417

@mitchellh

Description

@mitchellh
// 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-opacity baked in. This proposal adds iCursorColor as the pure, un-modified color from the colorscheme, giving shader authors both options. When using shaders to replace the cursor entirely (with cursor-opacity = 0.0), having access to the original color value is essential.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyA well-scoped, approachable issue for someone looking to contribute.renderer

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions