Skip to content

Commit 875f89b

Browse files
committed
Don't hash the uv's in geometry optimiser
This seems to not have any noticeable impact on performance, while allowing merging a bit more vertices, since having more precision in them doesn't have any visible effect (~0.04 texels for a 4k texture).
1 parent 2d718be commit 875f89b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/engine/renderer/GeometryOptimiser.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ struct MapVertHasher {
7575
hash += ( Util::bit_cast<uint32_t, float>( vert.xyz[2] ) << 11 );
7676
hash ^= ( Util::bit_cast<uint32_t, float>( vert.xyz[2] ) >> 16 );
7777

78-
hash += ( Util::bit_cast<uint32_t, float>( vert.st[0] ) << 7 );
79-
hash ^= ( Util::bit_cast<uint32_t, float>( vert.st[0] ) >> 12 );
80-
81-
hash += ( Util::bit_cast<uint32_t, float>( vert.st[1] ) << 13 );
82-
hash ^= ( Util::bit_cast<uint32_t, float>( vert.st[1] ) >> 8 );
83-
8478
return hash;
8579
}
8680
};

0 commit comments

Comments
 (0)