pub fn effect() -> Vec<u8> ⓘExpand description
Sorts all pixels in an image above the image’s average brightness by their brightness value. Results in a tearing-like effect often used in video games like Cyberpunk 2077.
First, the average brightness is calculated. Afterwards, given a mode (horizontal, vertical or both), pixels lighter than the average brightness are prepared to be sorted, then sorted in intervals.