Add a DxRenderer based on a glyph atlas #14268

Open
opened 2026-01-31 04:05:37 +00:00 by claunia · 0 comments
Owner

Originally created by @lhecker on GitHub (Jun 19, 2021).

Description of the new feature/enhancement

While the initial layouting and rasterization of glyphs is computationally expensive, the composition using a classic texture atlas and glyph-lookup-texture is extremely fast and, unless new glyphs appear on the screen, can be rendered in a single pass. Such an implementation would provide us with a high-framerate, low-latency renderer.

Proposed technical implementation details

The initial implementation to just render pure, colored, single-glyph-per-code-point text is quite trivial obviously. Guidance for this can be obtained from many sources throughout the web (even WikiBooks!). After an initial implementation has been drafted additional features could be added incrementally over time.
The renderer should live as an optional feature, that can be toggled on if the user wants to.

Further experience can be gained from the alacritty project.

Alternative solutions

DirectWrite uses a glyph atlas internally and we could continue to rely on it, but just optimize our render pass instead.
For instance a hybrid-approach would be feasible: Render everything but glyphs using a shader.

Originally created by @lhecker on GitHub (Jun 19, 2021). # Description of the new feature/enhancement While the initial layouting and rasterization of glyphs is computationally expensive, the composition using a classic texture atlas and glyph-lookup-texture is extremely fast and, unless new glyphs appear on the screen, can be rendered in a single pass. Such an implementation would provide us with a high-framerate, low-latency renderer. # Proposed technical implementation details The initial implementation to just render pure, colored, single-glyph-per-code-point text is quite trivial obviously. Guidance for this can be obtained from many sources throughout the web (even WikiBooks!). After an initial implementation has been drafted additional features could be added incrementally over time. The renderer should live as an optional feature, that can be toggled on if the user wants to. Further experience can be gained from the alacritty project. # Alternative solutions DirectWrite uses a glyph atlas internally and we could continue to rely on it, but just optimize our render pass instead. For instance a hybrid-approach would be feasible: Render everything but glyphs using a shader.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14268