maplibre-rs
maplibre-rs copied to clipboard
Fontrendering
Adds an experiments
folder with a standalone native app that tests rendering of text on the GPU.
See detailed explanation and a first benchmark here.
This PR is not finished, rather opened as a draft for visibility purposes.
Open Issues include:
- overlapping text "cancels" each other out, due to trick in fragment shader
- Glyphs are "tesselated" and drawn naively (i.e. each gets their own buffer, each gets a single draw call)
- Only tesselate each glyph once
- Draw instanced
- Enable styling (e.g. colors for a start)
This experiment could also be refactored to abstract the boilerplate code for the standalone winit/wgpu application away, so that that can be reused for other experiments (if we don't want to always work with the full maplibre-rs project as the basis)
Current status: Instances Rendering with support for per-word colors
(This frame took 8ms rendering time on M1 Macbook Pro)
Worth checking out: https://github.com/yeslogic/allsorts
@FabianWildgrube Hi! Are you still interested in pushing this forward? I think this approach is still very nice, though there were some limitations I don't remember right now.
Hi @maxammann - I still think it's an interesting and fun problem to look at. But realistically I'm not going to get to it because of work and other obligations 😞
Hi @maxammann - I still think it's an interesting and fun problem to look at. But realistically I'm not going to get to it because of work and other obligations 😞
Yeah same here :) no worries!