maplibre-rs icon indicating copy to clipboard operation
maplibre-rs copied to clipboard

Fontrendering

Open FabianWildgrube opened this issue 2 years ago • 5 comments

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)

FabianWildgrube avatar Apr 25 '22 12:04 FabianWildgrube

Current status: Instances Rendering with support for per-word colors Screenshot 2022-05-15 at 10 27 29 (This frame took 8ms rendering time on M1 Macbook Pro)

FabianWildgrube avatar May 15 '22 08:05 FabianWildgrube

Worth checking out: https://github.com/yeslogic/allsorts

maxammann avatar May 24 '22 07:05 maxammann

@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.

maxammann avatar Oct 20 '23 20:10 maxammann

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 😞

FabianWildgrube avatar Oct 31 '23 20:10 FabianWildgrube

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!

maxammann avatar Oct 31 '23 20:10 maxammann