Skip to content

examples: subtle warm cursor-glow shader - #68

Merged
EDToaster merged 1 commit into
mainfrom
cursor-glow-shader
Oct 22, 2026
Merged

EDToaster merged 1 commit into
mainfrom
cursor-glow-shader

Conversation

@EDToaster

Copy link
Copy Markdown
Owner

Adds examples/shaders/cursor-glow.glsl, a small post-process shader that draws a subtle warm yellow glow around the cursor. It also makes the README explain how to use the example shaders.

The shader

  • Glow: a soft halo that fades out about 2 cell heights from the cursor rect. The peak strength is 0.16.
    • It is applied with a screen blend in premultiplied space, so it never clips and stays correct over a transparent background.
    • It doesn't tint the cursor cell itself, so the character under the cursor keeps its colours.
  • Visibility: it follows iCursorVisible. It blinks with a blinking cursor and disappears when an app hides the cursor, so a hidden cursor never leaves a stray glow.
  • No idle cost: it only reads cursor uniforms and no time inputs, so it never animates. It is redrawn only when the cursor changes, which redraws anyway.

README

The shader section now says that shaders are plain files, not built in. It shows how to copy the examples into ~/.config/toastty/shaders/, uses the relative path shaders/crt-splitflap.glsl in the config example, and mentions cursor-glow.glsl.

Visual evidence

Real app on Xvfb (1280×800, X11 path), default theme. Crops are shown at 2×.

Before: no shader.

before: plain block cursor after "echo hello world", no glow

After: [shader] paths = ["…/cursor-glow.glsl"]. A faint warm halo surrounds the block cursor, and the rest of the frame is unchanged.

after: the same cursor with a soft warm yellow glow around it

Tests

The shader compiled through the app's GLSL path with no shader error in the log. Only a shader file and the README changed; there is no code change.

@EDToaster
EDToaster merged commit 986bd97 into main Oct 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant