https://github.com/ickk/rsdf
A multi-channel raster-sdf generator
https://github.com/ickk/rsdf
graphics
Last synced: about 1 year ago
JSON representation
A multi-channel raster-sdf generator
- Host: GitHub
- URL: https://github.com/ickk/rsdf
- Owner: ickk
- Created: 2021-12-31T12:59:26.000Z (over 4 years ago)
- Default Branch: dev
- Last Pushed: 2024-01-10T00:12:38.000Z (over 2 years ago)
- Last Synced: 2025-04-04T16:12:51.509Z (about 1 year ago)
- Topics: graphics
- Language: Rust
- Homepage:
- Size: 5.62 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A **raster signed distance field** generator
---
This project is an implementation of the technique outlined in
[Chlumsky's MSDF thesis][chlumsky-paper], which is an improvement on
[Valve's technique][valve-paper].
[chlumsky-paper]: https://github.com/Chlumsky/msdfgen/files/3050967/thesis.pdf "Shape Decomposition for Multi-channel Distance Field"
[valve-paper]: https://cdn.akamai.steamstatic.com/apps/valve/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf "Improved Alpha-Tested Magnification for Vector Textures and Special Effects"
---
### Status
Currently the `rsdf_core` crate is capable of decomposing shapes made of
lines, quadratic/cubic bezier curves, and elliptical arcs, however there is
still work to do to make it into a useful tool.
The logo above was rendered from the following multichannel SDF image, which
was generated using this codebase:

---
### Future work
- [ ] implement additional primitives
- [x] elliptic & circular arcs
- [ ] b-splines
- [ ] implement front-end asset processors (svg, fonts)
- [ ] try to parallelise the core with rustgpu