Reduced Vertex Count for Bars from 9 to 5

Added define for PI for shaders
Added Primes to Vertex Hash generation
Fixed Debris
This commit is contained in:
Raildex 2021-08-02 13:16:33 +02:00
parent e013ed4e24
commit 915b438f5a
17 changed files with 100 additions and 77 deletions

View file

@ -252,7 +252,9 @@ namespace T5M::Renderer
vertex->IndexInPoly = k;
vertex->OriginalIndex = v;
vertex->Effects = room->effects[v];
vertex->hash = std::hash<float>{}(vertex->Position.x) ^ std::hash<float>{}(vertex->Position.y) ^ std::hash<float>{}(vertex->Position.z);
unsigned long long primes[]{ 73856093ULL ,19349663ULL ,83492791ULL };
vertex->hash = std::hash<float>{}((vertex->Position.x)* primes[0]) ^ (std::hash<float>{}(vertex->Position.y)* primes[1]) ^ std::hash<float>{}(vertex->Position.z) * primes[2];
vertex->Bone = 0;
lastVertex++;