andrewlowndes/perfect-antialiasing
andrewlowndes/perfect-antialiasing has 31 GitHub stars and 0 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 06:18 UTC. Last push 2023-10-01.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
Antialiasing via conservative rasterisation and analytical area computation
Creative & MediaREADME.md
OriginalAntialiasing via conservative rasterisation and analytical area computation
A new technique for rendering 3D triangles with 'perfect' anti-aliasing. Fonts and vectors are broken into triangles and rasterised conservatively then a fragment shader determines the triangle area coverage to compute the alpha for each fragment.
Process
GPU Rendering of vector graphics at a sub-pixel accuracy:
- Triangulate curves into triangles
- Render each triangle using conservative rasterisation
- For each fragment:
- Perform a triangle/box intersection, creating a polygon
- Sum the areas of the triangles in the polygon
- Divide the sum by the fragment area to give a percentage coverage
- Continue for all triangles, additively blending
Preview

Demos
Visit https://andrewlowndes.github.io/perfect-antialiasing/dist/ to see a set of demos showing the various techniques used in this repo.
Run
- Ensure NodeJS installed
- Run
npm ito install dependencies - Run
npm startto open the demos in a web app
Roadmap
- CPU Demo (Canvas)
- Cubic/quadratic bezier tesselation
- Triangulate path to polygons
- Conservative rasterisation
- SVG test
- Cell logic
- Custom font rendering
- WebGL
- Conservative rasterisation (vertex-shader based shifting)
- Custom font rendering
- 3D Triangle
- 3D scene
- Screen-space tesselation
- Instancing
- Performance test
- Vulkan
- Screen-space tesselation via geometry shader
- Conservative rasterisation using gpu extensions
- Instancing
- Performance test
- Further experiments
- Exact curve coverage analytics
- Quadratic Bezier
- Cubic Bezier (prob too complicated)
- Exact curve coverage analytics
Usages
- Anti-aliasing in games (need to assess overhead of conservative rasterisation and the alpha computation in the fragment shader)
- Font rendering (still relies on triangulation - use screen-space in tesselation shader for resolution independent rendering)
Development
Install VS Code and the following extensions:
- EditorConfig for VS Code
- ESLint
- Prettier
References
Vertex-based conservative rasterisation based off algorithm 2 from GPU Gems 2 Chapter 43 (https://developer.nvidia.com/gpugems/gpugems2/part-v-image-oriented-computing/chapter-42-conservative-rasterization)