fix textures UV. drop leftovers. properly map material_lo.

This commit is contained in:
bird_egop
2026-06-06 23:25:14 +03:00
parent 5baf3f324f
commit 64fd54635e
9 changed files with 36 additions and 73 deletions
+1 -25
View File
@@ -1,5 +1,6 @@
using System.Buffers.Binary;
using System.Text;
using Common;
namespace MaterialLib;
@@ -168,28 +169,3 @@ public static class MaterialParser
return $"Интерполируется: {string.Join(", ", parts)} | Остальные компоненты копируются (Flags: 0x{(int)target:X})";
}
}
// Helper extensions
internal static class StreamExtensions
{
public static float ReadFloatLittleEndian(this Stream stream)
{
Span<byte> buffer = stackalloc byte[4];
stream.ReadExactly(buffer);
return BinaryPrimitives.ReadSingleLittleEndian(buffer);
}
public static ushort ReadUInt16LittleEndian(this Stream stream)
{
Span<byte> buffer = stackalloc byte[2];
stream.ReadExactly(buffer);
return BinaryPrimitives.ReadUInt16LittleEndian(buffer);
}
public static uint ReadUInt32LittleEndian(this Stream stream)
{
Span<byte> buffer = stackalloc byte[4];
stream.ReadExactly(buffer);
return BinaryPrimitives.ReadUInt32LittleEndian(buffer);
}
}