2019.3 support

This commit is contained in:
Perfare
2020-02-28 15:39:11 +08:00
parent d96cc3c762
commit 9d32a9dd6a
5 changed files with 48 additions and 8 deletions

View File

@ -46,6 +46,10 @@ namespace AssetStudio
var m_MotionVectors = reader.ReadByte();
var m_LightProbeUsage = reader.ReadByte();
var m_ReflectionProbeUsage = reader.ReadByte();
if (version[0] > 2019 || (version[0] == 2019 && version[0] >= 3)) //2019.3 and up
{
var m_RayTracingMode = reader.ReadByte();
}
reader.AlignStream();
}
else

View File

@ -591,6 +591,7 @@ namespace AssetStudio
public SerializedProgram progGeometry;
public SerializedProgram progHull;
public SerializedProgram progDomain;
public SerializedProgram progRayTracing;
public bool m_HasInstancingVariant;
public string m_UseName;
public string m_Name;
@ -616,6 +617,10 @@ namespace AssetStudio
progGeometry = new SerializedProgram(reader);
progHull = new SerializedProgram(reader);
progDomain = new SerializedProgram(reader);
if (version[0] > 2019 || (version[0] == 2019 && version[0] >= 3)) //2019.3 and up
{
progRayTracing = new SerializedProgram(reader);
}
m_HasInstancingVariant = reader.ReadBoolean();
if (version[0] >= 2018) //2018 and up
{
@ -759,9 +764,18 @@ namespace AssetStudio
{
m_ParsedForm = new SerializedShader(reader);
platforms = reader.ReadUInt32Array().Select(x => (ShaderCompilerPlatform)x).ToArray();
offsets = reader.ReadUInt32Array();
compressedLengths = reader.ReadUInt32Array();
decompressedLengths = reader.ReadUInt32Array();
if (version[0] > 2019 || (version[0] == 2019 && version[0] >= 3)) //2019.3 and up
{
offsets = reader.ReadUInt32ArrayArray().Select(x => x[0]).ToArray();
compressedLengths = reader.ReadUInt32ArrayArray().Select(x => x[0]).ToArray();
decompressedLengths = reader.ReadUInt32ArrayArray().Select(x => x[0]).ToArray();
}
else
{
offsets = reader.ReadUInt32Array();
compressedLengths = reader.ReadUInt32Array();
decompressedLengths = reader.ReadUInt32Array();
}
compressedBlob = reader.ReadBytes(reader.ReadInt32());
}
else