[PR #12548] AtlasEngine: Fix inverted cursor alpha #29108

Open
opened 2026-01-31 09:32:51 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/12548

State: closed
Merged: Yes


The previous implementation only inverted the RGB values of the cell,
but failed to account for situations where the color is transparent,
which is the case when backgroundOpaqueMixin is 0 (for instance if
acrylic backgrounds are enabled). In these situations the alpha
component remained 0 which caused the cursor to be invisible.

For some inexplicable reason this issue is only visible on a HDR display,
even though it should also effect regular ones. God knows why.

With this commit the cursor texture is treated as a mask that inverts the color.
We use branching here, because I couldn't come up with a more clever solution.

PR Checklist

Validation Steps Performed

  • Cursor is visible on a HDR display with acrylic background ✅
  • TBD performance benchmark for [branch] ❌
**Original Pull Request:** https://github.com/microsoft/terminal/pull/12548 **State:** closed **Merged:** Yes --- The previous implementation only inverted the RGB values of the cell, but failed to account for situations where the `color` is transparent, which is the case when `backgroundOpaqueMixin` is 0 (for instance if acrylic backgrounds are enabled). In these situations the alpha component remained 0 which caused the cursor to be invisible. For some inexplicable reason this issue is only visible on a HDR display, even though it should also effect regular ones. God knows why. With this commit the cursor texture is treated as a mask that inverts the color. We use branching here, because I couldn't come up with a more clever solution. ## PR Checklist * [x] Closes #12507 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * Cursor is visible on a HDR display with acrylic background ✅ * TBD performance benchmark for `[branch]` ❌
claunia added the pull-request label 2026-01-31 09:32:51 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29108