mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2026-08-15 02:57:49 +04:00
fix material texture name
This commit is contained in:
@@ -83,7 +83,12 @@ public static class MaterialParser
|
||||
// Texture name: 16 байт.
|
||||
textureNameBuffer.Clear();
|
||||
fs.ReadExactly(textureNameBuffer);
|
||||
var textureName = Encoding.ASCII.GetString(textureNameBuffer).TrimEnd('\0');
|
||||
var terminator = textureNameBuffer.IndexOf((byte)0);
|
||||
if (terminator == -1)
|
||||
{
|
||||
terminator = textureNameBuffer.Length - 1;
|
||||
}
|
||||
var textureName = Encoding.ASCII.GetString(textureNameBuffer[..terminator]);
|
||||
|
||||
stages.Add(new MaterialStage(
|
||||
ambientR,
|
||||
|
||||
Reference in New Issue
Block a user