Skip to content

Implement per pixel text edge fades - #12

Merged
wingleeio merged 2 commits into
zeronsh:mainfrom
gaelcado:fix/per-pixel-text-fade
Sep 16, 2026
Merged

wingleeio merged 2 commits into
zeronsh:mainfrom
gaelcado:fix/per-pixel-text-fade

Conversation

@gaelcado

@gaelcado gaelcado commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Text inside an EdgeFade currently receives one opacity per glyph, sampled from an estimated font_size * 0.6 bounding box. Small horizontal movements can therefore dim or hide an entire character at once.

Pass the existing device-space EdgeFadeParams through monochrome and subpixel sprite buffers and evaluate the ramp in the fragment shader on Metal, WGPU, and DirectX. Preserve the existing squared ramp and uniform element opacity. SVG icons retain their current whole-primitive behavior and do not get faded twice.

Validation:

  • Zeron UI compiles against the local renderer changes, including Metal shader compilation.
  • Headless Metal GPU regression test passes: checks opacity at multiple pixels within one glyph-sized mask, a half-pixel edge shift, and the disabled fade case.
  • WGPU shader validation and CPU/GPU sprite layout checks passed for both grayscale and subpixel paths.
  • Windows renderer CI passes at 53869c2. Fixed missing fade defaults in the Direct3D and scene test fixtures; Direct3D WARP, scene-ordering, SVG tests and the backdrop example build all pass.

Companion to zeronsh/zeron#415, which separately smooths the onset of sidebar overflow fades. Controlled static sidebar fixtures were inspected; live resizing remains unverified.

CPU sanity check: local before/after runs showed unchanged idle usage and no obvious large CPU regression during repeated sidebar redraws. Dev-build samples were noisy, so this is a coarse regression check rather than a precise performance claim.

Visual preview

Sidebar fade preview

User-supplied preview; exact running build not recorded.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@gaelcado gaelcado changed the title Evaluate text edge fades per pixel Implement per pixel text edge fades Sep 16, 2026
@gaelcado
gaelcado marked this pull request as ready for review September 16, 2026 21:35
@wingleeio
wingleeio merged commit 1561532 into zeronsh:main Sep 16, 2026
2 checks passed
hoangvu12 added a commit to hoangvu12/roboco that referenced this pull request Sep 21, 2026
Port of zeronsh/zeron 6eae024 ("Update ZUI to audited Windows backdrop
renderer").

Roboco's previous pin 86f2ecef already carried the renderer itself (authored
on hoangvu12/zui fix/windows-nested-frosted-blur, merged upstream as
zeronsh/zui#10). This moves the pin to upstream's declared audited rev
c2d273dc, adding exactly the two missing zui-side commits: 52ec2e39 (bounds
Windows blur work — MAX_SIGMA clamp, 192-tap shader cap — and validates blur
geometry; plus zui-repo renderer CI and test fonts) and c2d273dc (zui-repo
review-branch CI wiring). No zui-side push was needed: c2d273dc is already
published on hoangvu12/zui (branch fix/windows-nested-frosted-blur).

Top-level gpui/gpui_platform/gpui_tokio pins and all 16
[patch."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/zeronsh/zui"] revs move together (AGENTS.md pin
rule); Cargo.lock keeps exactly one GPUI identity, all 20 zui crate sources
at c2d273dc, no other dependency changes. AGENTS.md updated (it still
claimed the stale aa009411 rev).

Deliberately excluded:
- 7f0cd13 (gpui-base pin align): hoangvu12/gpui-component does not contain
  the equivalent of zeronsh/gpui-component 03cd9947, and roboco's [patch]
  redirect already collapses every zeronsh/zui dependency onto the pinned
  rev — the lockfile retains one GPUI copy with gpui-base at 94c1bbaf.
- Upstream's [patch] redirect to gaelcado/zui 53869c20 (per-pixel text edge
  fades, zeronsh/zui#12 line): not part of this ticket; roboco stays on
  hoangvu12/zui per AGENTS.md.

Verified: cargo check -p roboco-ui; Cargo.lock inspected for a single gpui
source identity.
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.

2 participants