From 141c3755814cea60888c7ee548c7ce709550b784 Mon Sep 17 00:00:00 2001 From: reduz Date: Sat, 18 Jun 2022 16:20:55 +0200 Subject: Clean up Hash Functions Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934 * Clean up usage of murmur3 * Fixed usages of binary murmur3 on floats (this is invalid) * Changed DJB2 to use xor (which seems to be better) --- modules/raycast/raycast_occlusion_cull.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/raycast') diff --git a/modules/raycast/raycast_occlusion_cull.h b/modules/raycast/raycast_occlusion_cull.h index 4474031991..6562c4e9c4 100644 --- a/modules/raycast/raycast_occlusion_cull.h +++ b/modules/raycast/raycast_occlusion_cull.h @@ -87,8 +87,8 @@ private: RID instance; static uint32_t hash(const InstanceID &p_ins) { - uint32_t h = hash_djb2_one_64(p_ins.scenario.get_id()); - return hash_djb2_one_64(p_ins.instance.get_id(), h); + uint32_t h = hash_murmur3_one_64(p_ins.scenario.get_id()); + return hash_fmix32(hash_murmur3_one_64(p_ins.instance.get_id(), h)); } bool operator==(const InstanceID &rhs) const { return instance == rhs.instance && rhs.scenario == scenario; -- cgit v1.2.3