diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-06-20 14:01:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-20 14:01:06 +0200 |
commit | 66a30dab35f3788ae28c7e6171d3908fe75e7b75 (patch) | |
tree | cc5045d98995b754097d1dde100f0138033fc735 /scene/resources/surface_tool.cpp | |
parent | 8e3d9a23aa0a724d3dd25fcf0e8085b5a438c233 (diff) | |
parent | 141c3755814cea60888c7ee548c7ce709550b784 (diff) |
Merge pull request #62176 from reduz/cleanup-hashfuncs
Diffstat (limited to 'scene/resources/surface_tool.cpp')
-rw-r--r-- | scene/resources/surface_tool.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 77d6e3c6f9..9829c7e86b 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -141,7 +141,8 @@ uint32_t SurfaceTool::VertexHasher::hash(const Vertex &p_vtx) { h = hash_djb2_buffer((const uint8_t *)p_vtx.bones.ptr(), p_vtx.bones.size() * sizeof(int), h); h = hash_djb2_buffer((const uint8_t *)p_vtx.weights.ptr(), p_vtx.weights.size() * sizeof(float), h); h = hash_djb2_buffer((const uint8_t *)&p_vtx.custom[0], sizeof(Color) * RS::ARRAY_CUSTOM_COUNT, h); - h = hash_djb2_one_32(p_vtx.smooth_group, h); + h = hash_murmur3_one_32(p_vtx.smooth_group, h); + h = hash_fmix32(h); return h; } |