Update pixel hash function to the latest spec

This commit is contained in:
Ivan Smirnov 2021-12-29 16:11:27 +03:00
parent 6640bc571a
commit f906d13e90

View file

@ -42,7 +42,7 @@ impl<const N: usize> Pixel<N> {
#[inline]
pub const fn hash_index(self) -> u8 {
(self.r() ^ self.g() ^ self.b() ^ self.a_or(0xff)) % 64
(self.r() * 3 + self.g() * 5 + self.b() * 7 + self.a_or(0xff) * 11) % 64
}
#[inline]