Awesome
DitherFx
▒░ Dither post effect for Unity Urp, controlled via volume profile </br> ▒░ Works as render feature or a pass for selective post processing VolFx
Features
- custom palettes and patterns
- pattern distribution and animation options
- noise mode
can be used to process greenscreen video to pixelart sprites at runtime using palette with alpha channel and VolFx
Part of Artwork Project
- Vhs
- OldMovie
- GradientMap
- Outline
- Flow
- Pixelation
- Ascii
- [Dither]
- ...
Usage
Install via Unity PackageManager
https://github.com/NullTale/DitherFx.git
Works as render feature, some parameters </br> and default volume settings can be configured in the asset.</br>
Tech
The effect works by calculating a deviation for each pixel of the original image from the nearest color,</br> if it is large enough it replaces it with the second closest color from the palette doing it according to the ScreenSpace pattern or random noise. </br>
Dither Power, palette, pattern type and its animation can be customized in VolumeSettings or in RenderFeature settings.</br> All calculations are performed in the fragment shader through hased Lut tables.</br>
To measure a colors of an original image three lut table are used
- palette color - color replacement from the palette
- deviation color - second closest color from the palette
- and measure - distance to the clossets color, used evaluate dithering power
Tables are generated at Runtime when an unknown palette is used for the first time and shared beetween all features.</br>