Improving texture atlas allocation in WebRender

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • Vrmac

    Vrmac Graphics, a cross-platform graphics library for .NET. Supports 3D, 2D, and accelerated video playback. Works on Windows 10 and Raspberry Pi4.

  • And ported from C to C++: https://github.com/Const-me/nanovg/blob/master/src/FontStash...

    Font atlas is required to be dynamic because Unicode has too many different codepoints. Statically allocated bitmap fonts no longer work in practice. Based on the pictures in the article, it works better than what WebRender is doing.

    The performance is good even on Raspberry Pi. This library https://github.com/Const-me/Vrmac uses 3 of them: RGBA for sprites, another RGBA for ClearType fonts, and grayscale one for non-ClearType fonts.

    > a batch can only reference a fixed set of resources (such as GPU buffers and textures)

    Technically that’s true, but not practically. There’s GPU resource type called “texture array”. It’s possible to append new layers into an array without moving data across PCIe and back.

  • fontstash

    Light-weight online font texture atlas builder

  • https://github.com/memononen/fontstash/blob/203fec2eb6a8905a...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • noclip.website

    A digital museum of video game levels

  • I wrote a basic allocator for runtime lightmap packing (a very different problem than dynamic image packing tbf), and a simple skyline got me very good results, for about 50 lines of code:

    https://github.com/magcius/noclip.website/blob/master/src/So...

    Compared to shelf, I think it did really well on the input data I had. I didn't even use the Halo Reach tricks for removing border padding when packing subpixel lightmaps!

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts