This commit is contained in:
Razmoth
2023-05-06 09:46:35 +04:00
parent 85ab8eec3c
commit 8e0f97ce2d
34 changed files with 903 additions and 864 deletions

View File

@@ -25,6 +25,11 @@ namespace AssetStudio
{
var m_UpdateMode = reader.ReadInt32();
}
if (reader.Game.Type.IsSR())
{
var m_MotionSkeletonMode = reader.ReadInt32();
}
var m_ApplyRootMotion = reader.ReadBoolean();
if (version[0] == 4 && version[1] >= 5) //4.5 and up - 5.0 down

View File

@@ -19,6 +19,8 @@ namespace AssetStudio
public abstract class Renderer : Component
{
public static bool Parsable;
public PPtr<Material>[] m_Materials;
public StaticBatchInfo m_StaticBatchInfo;
public uint[] m_SubsetIndices;
@@ -218,7 +220,7 @@ namespace AssetStudio
var m_UseHighestMip = reader.ReadBoolean();
reader.AlignStream();
}
if (reader.Game.Type.IsSRCB3())
if (reader.Game.Type.IsSR())
{
var RenderFlag = reader.ReadUInt32();
reader.AlignStream();

View File

@@ -578,6 +578,9 @@ namespace AssetStudio
public UAVParameter[] m_UAVParams;
public SamplerParameter[] m_Samplers;
private static bool HasGlobalLocalKeywordIndices(ObjectReader reader) => reader.serializedType.Match("E99740711222CD922E9A6F92FF1EB07A") || reader.serializedType.Match("450A058C218DAF000647948F2F59DA6D");
private static bool HasInstancedStructuredBuffers(ObjectReader reader) => reader.serializedType.Match("E99740711222CD922E9A6F92FF1EB07A");
public SerializedSubProgram(ObjectReader reader)
{
var version = reader.version;
@@ -585,7 +588,7 @@ namespace AssetStudio
m_BlobIndex = reader.ReadUInt32();
m_Channels = new ParserBindChannels(reader);
if ((version[0] >= 2019 && version[0] < 2021) || (version[0] == 2021 && version[1] < 2) || reader.Match("E99740711222CD922E9A6F92FF1EB07A") || reader.Match("450A058C218DAF000647948F2F59DA6D")) //2019 ~2021.1
if ((version[0] >= 2019 && version[0] < 2021) || (version[0] == 2021 && version[1] < 2) || HasGlobalLocalKeywordIndices(reader)) //2019 ~2021.1
{
var m_GlobalKeywordIndices = reader.ReadUInt16Array();
reader.AlignStream();
@@ -687,7 +690,7 @@ namespace AssetStudio
}
}
if (reader.Match("E99740711222CD922E9A6F92FF1EB07A"))
if (HasInstancedStructuredBuffers(reader))
{
int numInstancedStructuredBuffers = reader.ReadInt32();
var m_InstancedStructuredBuffers = new ConstantBuffer[numInstancedStructuredBuffers];
@@ -974,6 +977,8 @@ namespace AssetStudio
public class Shader : NamedObject
{
public static bool Parsable;
public byte[] m_Script;
//5.3 - 5.4
public uint decompressedSize;