Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
NodeBufferedData.cpp
Go to the documentation of this file.
1
2
4
5
6namespace Divide {
7 size_t HashMaterialData(const NodeMaterialData& dataIn)
8 {
9 size_t tempHash = 9999991;
10
11 Util::Hash_combine(tempHash, dataIn._albedo.x * 255,
12 dataIn._albedo.y * 255,
13 dataIn._albedo.z * 255,
14 dataIn._albedo.w * 255);
15
16 Util::Hash_combine(tempHash, dataIn._emissiveAndParallax.x * 255,
17 dataIn._emissiveAndParallax.y * 255,
18 dataIn._emissiveAndParallax.z * 255,
19 dataIn._emissiveAndParallax.w * 255);
20
21 Util::Hash_combine(tempHash, dataIn._colourData.x * 255,
22 dataIn._colourData.y * 255,
23 dataIn._colourData.z * 255,
24 dataIn._colourData.w * 255);
25
26 Util::Hash_combine(tempHash, dataIn._data.x * 255,
27 dataIn._data.y * 255,
28 dataIn._data.z * 255,
29 dataIn._data.w * 255);
30
31 Util::Hash_combine(tempHash, dataIn._textureOperations.x * 255,
32 dataIn._textureOperations.y * 255,
33 dataIn._textureOperations.z * 255,
34 dataIn._textureOperations.w * 255);
35
36 return tempHash;
37 }
38
39} //namespace Divide
void Hash_combine(size_t &seed, const T &v, const Rest &... rest) noexcept
a la Boost
Definition: MathHelper.inl:799
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
size_t HashMaterialData(const NodeMaterialData &dataIn)