CleanEdge is an [[MIT License]] licensed pixel art image scaling and rotation algorithm written in [[GLSL]] and/or [[GDSL]].
- [Website](https://torcado.com/cleanEdge/)
- [Source](https://gist.github.com/torcado194/e2794f5a4b22049ac0a41f972d14c329)
- [Documentation](https://cohost.org/torcado/post/677300-clean-edge-an-improv)
> an improved pixel art upscaling algorithm for clean rotations
# Notability
Clean scaling and rotation can be pretty challenging to get good results, particularly for pixel art, leaving weird gaps or blurring and smudging the image. This does a pretty good job of handling.
# Philosophy
> the idea with this system is to approximate the best-case source image, what someone might draw if they needed the most data present for a rotation to use, i.e. a vector image. in the most basic case, a pixel artist drawing a 1-pixel thick diagonal line is representing what would really be a solid 1-pixel thick line
>
> and in fact, if you have an exactly 1-pixel thick vector line and rotate it, it's guaranteed to never produce any gaps when rasterized to nearest neighbor! this was the original idea i had many years ago.
>
> so, cleanEdge tries to make lines and edges as close to solid 1-pixel thick lines, by expanding those regions into neighboring pixels (and vice versa)
# Platform Support
The example implementation code is provided in [[OpenGL]] shader language and [[Godot]] shader language.
# Features
# Tips
# References