The Scanline Sweeper: A Glyph Rendering Algorithm

scanline_sweeper

Unlike other posts on this site, the content for this post is embedded in the following links:

Abstract

One fundamental building block of Bézier curve rasterization has historically been winding-number computation. Winding-number evaluation per-pixel or per-sample permits rasterization on both the CPU and GPU, but presents implementation challenges due to the need for precise quadratic root-finding. Algorithm failures can result in large discrepancies in the computed coverage estimate for a pixel, and while solutions for these numerical failures exist, a different direction based on continuous coverage estimates is worth exploring.

In this paper, I present the Scanline Sweeper, a distinct paradigm for Bézier curve rasterization that estimates coverage analytically, without computing explicit winding numbers and without any tessellation. While the Scanline Sweeper uses quadratic root-finding, perturbations in the outcome only modestly perturb final coverage estimates, resulting in a numerically robust algorithm.

Author’s disclaimer: This is a self-published preprint, not subject to a traditional peer-review, and not submitted to any academic journal. While the ideas here are original in the sense that I have not seen them elsewhere, my background is primarily in 3D graphics programming for AAA games, so it’s possible these ideas are already explored in an industry or domain unfamiliar to me. Errors will be corrected and amended versions will be posted as time permits.

Citation:

Scuff3D Rook, The Scanline Sweeper: A Glyph Rendering Algorithm, Rook & Possum, 2026. [Online]. Available: https://rookandpossum.com/posts/scanline-sweeper/

As with other code on the site, all source code in this paper is subject to the terms of the Mozilla Public License, v. 2.0. This license can be obtained at https://mozilla.org/MPL/2.0/.


Discuss this post on Patreon.