Change handling of associated shpk for material.

This commit is contained in:
Ottermandias 2023-02-23 15:20:51 +01:00
parent a2b62a8b6a
commit 7e56858bc6
3 changed files with 53 additions and 37 deletions

View file

@ -94,7 +94,7 @@ public partial class MtrlFile : IWritable
return samplers;
}
public MtrlFile(byte[] data, Func<string, ShpkFile?>? loadAssociatedShpk = null)
public MtrlFile(byte[] data)
{
using var stream = new MemoryStream(data);
using var r = new BinaryReader(stream);
@ -133,8 +133,6 @@ public partial class MtrlFile : IWritable
ShaderPackage.Name = UseOffset(strings, shaderPackageNameOffset);
AssociatedShpk = loadAssociatedShpk?.Invoke(ShaderPackage.Name);
AdditionalData = r.ReadBytes(additionalDataSize);
for (var i = 0; i < ColorSets.Length; ++i)
{