You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a known caveat of #19: most drawables are clipped to the region by use of a separate render pass; doing the same for fonts is less easy. To quote myself from that PR:
This is because glyph_brush draws everything in a single render pass, which doesn't let us apply GPU scissor regions as required. Options:
Queue sections for each region independently, using a new render pass for each region. This is what Iced does, but is not quite so easy with KAS's render pipe. This also implies one should use GlyphBrush::keep_cached to keep sections in the cache (which Iced currently doesn't; hint @hecrj).
Use a separate instance of GlyphBrush for each region. This makes it easy to queue sections correctly, but requires constructing new instances on demand (may cause lag) and prevents sharing of cached glyphs.
Use the z value included in sections and assign a distinct depth value to each layer. Needs further investigation.
Perform clipping within wgpu_glyph by adding a bounding rect to each section.
This turned out more complex than I had expected. @hecrj may I ask if you put any effort into investigating alternatives here?
The text was updated successfully, but these errors were encountered:
The proper fix for this is to overhaul wgpu_glyph and make the cache aware of multiple draw calls.
I have plans to change wgpu_glyph heavily at some point to support shaping and use a faster font rasterizer. It will probably turn into a new crate. I will most likely tackle this issue then.
This was fixed in #94 via use of a depth-buffer. This may in any case be the best solution since it enables fonts to be drawn in a single pass, including on (and under) pop-up layers.
This is a known caveat of #19: most drawables are clipped to the region by use of a separate render pass; doing the same for fonts is less easy. To quote myself from that PR:
The text was updated successfully, but these errors were encountered: