Add backface and transparency handling as well as more info to Mtrl handling.

This commit is contained in:
Ottermandias 2022-10-12 12:16:21 +02:00
parent febfa8836e
commit 847d8432ff
3 changed files with 118 additions and 11 deletions

View file

@ -66,7 +66,7 @@ public partial class MtrlFile
w.Write( ( ushort )ShaderPackage.ShaderKeys.Length );
w.Write( ( ushort )ShaderPackage.Constants.Length );
w.Write( ( ushort )ShaderPackage.Samplers.Length );
w.Write( ShaderPackage.Unk );
w.Write( ShaderPackage.Flags );
foreach( var key in ShaderPackage.ShaderKeys )
{

View file

@ -249,7 +249,7 @@ public partial class MtrlFile : IWritable
public Constant[] Constants;
public Sampler[] Samplers;
public float[] ShaderValues;
public uint Unk;
public uint Flags;
}
@ -326,7 +326,7 @@ public partial class MtrlFile : IWritable
var shaderKeyCount = r.ReadUInt16();
var constantCount = r.ReadUInt16();
var samplerCount = r.ReadUInt16();
ShaderPackage.Unk = r.ReadUInt32();
ShaderPackage.Flags = r.ReadUInt32();
ShaderPackage.ShaderKeys = r.ReadStructuresAsArray< ShaderKey >( shaderKeyCount );
ShaderPackage.Constants = r.ReadStructuresAsArray< Constant >( constantCount );