This commit is contained in:
max
2026-03-24 22:34:47 +01:00
parent eb6294c09e
commit 177ee18f52
3 changed files with 0 additions and 4 deletions

View File

@@ -32,7 +32,6 @@
uint packed = face._data; uint packed = face._data;
int offset = i * 4; int offset = i * 4;
// Write little-endian (important!)
result[offset] = (byte)(packed); result[offset] = (byte)(packed);
result[offset + 1] = (byte)(packed >> 8); result[offset + 1] = (byte)(packed >> 8);
result[offset + 2] = (byte)(packed >> 16); result[offset + 2] = (byte)(packed >> 16);

View File

@@ -103,14 +103,12 @@ namespace Voxel.Core
); );
} }
/// highly optimized getter for the hot-path (Meshing/Raycasting)
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static BlockDefinition Get(Blocks type) public static BlockDefinition Get(Blocks type)
{ {
return _definitions[(byte)type]; return _definitions[(byte)type];
} }
// internal helper to map the array
private static void Define(Blocks type, Textures tex) private static void Define(Blocks type, Textures tex)
=> _definitions[(byte)type] = new BlockDefinition(type, tex); => _definitions[(byte)type] = new BlockDefinition(type, tex);

View File

@@ -107,7 +107,6 @@ namespace Voxel.Core
public void UpdateChunkMesh() public void UpdateChunkMesh()
{ {
// Lock or use ThreadLocal for multi-threading later
lock (_faceBuffer) lock (_faceBuffer)
{ {
_faceBuffer.Clear(); _faceBuffer.Clear();