- [Core] Fix issue with exporting/previewing new shader foramt [GI]
This commit is contained in:
@@ -578,8 +578,8 @@ 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 static bool HasGlobalLocalKeywordIndices(SerializedType type) => type.Match("E99740711222CD922E9A6F92FF1EB07A") || type.Match("450A058C218DAF000647948F2F59DA6D");
|
||||
public static bool HasInstancedStructuredBuffers(SerializedType type) => type.Match("E99740711222CD922E9A6F92FF1EB07A");
|
||||
|
||||
public SerializedSubProgram(ObjectReader reader)
|
||||
{
|
||||
@@ -588,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) || HasGlobalLocalKeywordIndices(reader)) //2019 ~2021.1
|
||||
if ((version[0] >= 2019 && version[0] < 2021) || (version[0] == 2021 && version[1] < 2) || HasGlobalLocalKeywordIndices(reader.serializedType)) //2019 ~2021.1
|
||||
{
|
||||
var m_GlobalKeywordIndices = reader.ReadUInt16Array();
|
||||
reader.AlignStream();
|
||||
@@ -690,7 +690,7 @@ namespace AssetStudio
|
||||
}
|
||||
}
|
||||
|
||||
if (HasInstancedStructuredBuffers(reader))
|
||||
if (HasInstancedStructuredBuffers(reader.serializedType))
|
||||
{
|
||||
int numInstancedStructuredBuffers = reader.ReadInt32();
|
||||
var m_InstancedStructuredBuffers = new ConstantBuffer[numInstancedStructuredBuffers];
|
||||
|
||||
Reference in New Issue
Block a user