Files
UnrealEngineUWP/Engine/Shaders/Private/Hash.ush
tiago costa 2bffbe5679 Moved Murmur functions to Hash.ush.
- Removed duplicate definitions of murmur and visualization functions.

#rb aleksander.netzel
#preflight none

[CL 20536390 by tiago costa in ue5-main branch]
2022-06-07 09:11:58 -04:00

26 lines
469 B
Plaintext

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
uint MurmurAdd(uint Hash, uint Element)
{
Element *= 0xcc9e2d51;
Element = (Element << 15) | (Element >> (32 - 15));
Element *= 0x1b873593;
Hash ^= Element;
Hash = (Hash << 13) | (Hash >> (32 - 13));
Hash = Hash * 5 + 0xe6546b64;
return Hash;
}
uint MurmurMix(uint Hash)
{
Hash ^= Hash >> 16;
Hash *= 0x85ebca6b;
Hash ^= Hash >> 13;
Hash *= 0xc2b2ae35;
Hash ^= Hash >> 16;
return Hash;
}