-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite AtlasEngine to allow arbitrary overhangs #14959
Rewrite AtlasEngine to allow arbitrary overhangs #14959
Conversation
|
Only when they use the |
Noticed while testing this branch it brings back rendering of shaders over remote desktop which was lost in current Preview builds. Not sure which is the bug, but I want this way. |
I got a chance to ask someone much more knowledgeable about this today and they suggested to only stop using Direct3D when we don't detect a phyiscal GPU. So I think that's what we'll do now. But at least in my understanding the current preview builds should already work that way. I'm surprised they don't. If your host has a phyiscal GPU you should always get shader support... 🤔 terminal/src/renderer/atlas/AtlasEngine.cpp Lines 670 to 676 in fe2220e
The new approach doesn't do this, so maybe that's what fixed it. |
It's the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main request would be to add method descriptions to all the new functions in AtlasEngine.cpp
, AtlastEngine.r.cpp
, Backend.cpp
, BackendD2D.cpp
and BackendD3D.cpp
. Not worth blocking over but it would be nice to have those before this merges. Otherwise I'm down to see what breaks in post
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
@j4james I've implemented "reversed" text colors for colored cursors now, as per your suggestion: (Thank you so much once again!) It doesn't include an algorithm to ensure proper contrast at all times, but I hope to get to that soon. I'll probably go with ΔEOK, because it is computationally less expensive than ΔE2000 while providing results of similar quality. And it can be easily implemented with SIMD via DirectXMath. |
This is practically a from scratch rewrite of AtlasEngine.
The initial approach used a very classic monospace text renderer, where
the viewport is subdivided into cells and each cell is assigned one
glyph texture, just like how real terminals used to work.
While we knew that it would have problems with overly large glyphs,
like those found in less often used languages, we didn't expect the
absolutely massive number of fonts that this approach would break.
For one, the assumption that monospace fonts are actually mostly
monospace has turned out to be a complete lie and we can't force users
to use better designed fonts. But more importantly, we can't just
design an entire Unicode fallback font collection from scratch where
every major glyph is monospace either. This is especially problematic
for vertical overhangs which are extremely difficult to handle in a
way that outperforms the much simpler alternative approach:
Just implementing a bog-standard, modern, quad-based text renderer.
Such an approach is both, less code and runs faster due to a less
complex CPU-side. The text shaping engine (in our case DirectWrite)
has to resolve text into glyph indices anyways, so using them directly
for text rendering allows reduces the effort of turning it back into
text ranges and hashing those. It's memory overhead is also reduced,
because we can now break up long ligatures into their individual glyphs.
Especially on AMD APUs I found this approach to run much faster.
A list of issues I think are either obsolete (and could be closed)
or resolved with this PR in combination with #14255:
Closes #6864
Closes #6974
Closes #8993
Closes #9940
Closes #10128
Closes #12537
Closes #13064
Closes #13527
Closes #13662
Closes #13700
Closes #13989
Closes #14022
Closes #14057
Closes #14094
Closes #14098
Closes #14117
Closes #14533
Closes #14877
Closes #9381
PR Checklist
"`u{e0b2}`u{e0b0}"
in Fira Code Nerd Font forms a square ✅✅+Heatmap_ShowDirtyRegions
shows that only the cursorregion is dirty when it's blinking ✅✅
They're filled with the neighboring's cell background color for
convenience, as D2D doesn't support
D3D11_TEXTURE_ADDRESS_BORDER