Set the shader type properly
This commit is contained in:
parent
01ae391de6
commit
ffa130a98b
Binary file not shown.
@ -58,7 +58,7 @@ namespace FirstPlugin
|
||||
{
|
||||
ShaderProgram program = new ShaderProgram();
|
||||
program.Text = reader.LoadString(true, typeof(ulong));
|
||||
uint unk = reader.ReadUInt32();
|
||||
uint Type = reader.ReadUInt32();
|
||||
uint unk2 = reader.ReadUInt32(); //Usually 2
|
||||
long BinaryOffset = reader.ReadOffset(true, typeof(ulong));
|
||||
ulong BinarySize = reader.ReadUInt64();
|
||||
@ -66,6 +66,11 @@ namespace FirstPlugin
|
||||
ulong padding = reader.ReadUInt64();
|
||||
ulong padding2 = reader.ReadUInt64();
|
||||
|
||||
if (Type == 0)
|
||||
program.ShaderType = NSWShaderDecompile.NswShaderType.Vertex;
|
||||
if (Type == 2)
|
||||
program.ShaderType = NSWShaderDecompile.NswShaderType.Fragment;
|
||||
|
||||
using (reader.TemporarySeek(BinaryOffset, System.IO.SeekOrigin.Begin))
|
||||
{
|
||||
program.Data = reader.ReadBytes((int)BinarySize);
|
||||
@ -86,7 +91,7 @@ namespace FirstPlugin
|
||||
|
||||
public class ShaderProgram : TreeNodeCustom
|
||||
{
|
||||
NSWShaderDecompile.NswShaderType ShaderType { get; set; }
|
||||
public NSWShaderDecompile.NswShaderType ShaderType { get; set; }
|
||||
|
||||
public byte[] Data { get; set; }
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user