For later: Addition on its own is a really terrible hash (small textures of the same number of pixels and similar brightness are not at all unlikely to collide), maybe should try to get some bit rotation and xoring too. Dunno how much slower that would make it though.