mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -04:00
Fixed #228
This commit is contained in:
parent
adf39dde27
commit
e034ac5c1e
@ -810,18 +810,21 @@ namespace AssetStudio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
//actual Vertex Buffer
|
||||||
|
var m_DataSize = reader.ReadBytes(reader.ReadInt32());
|
||||||
|
|
||||||
if (version[0] >= 5) //ComputeCompressedStreams
|
if (version[0] >= 5) //ComputeCompressedStreams
|
||||||
{
|
{
|
||||||
m_Streams = new StreamInfo[streamCount];
|
m_Streams = new StreamInfo[streamCount];
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
for (int str = 0; str < streamCount; str++)
|
for (int s = 0; s < streamCount; s++)
|
||||||
{
|
{
|
||||||
int chnMask = 0;
|
int chnMask = 0;
|
||||||
int stride = 0;
|
int stride = 0;
|
||||||
for (int chn = 0; chn < m_Channels.Length; chn++)
|
for (int chn = 0; chn < m_Channels.Length; chn++)
|
||||||
{
|
{
|
||||||
var m_Channel = m_Channels[chn];
|
var m_Channel = m_Channels[chn];
|
||||||
if (m_Channel.stream == str)
|
if (m_Channel.stream == s)
|
||||||
{
|
{
|
||||||
if (m_Channel.dimension > 0)
|
if (m_Channel.dimension > 0)
|
||||||
{
|
{
|
||||||
@ -830,7 +833,11 @@ namespace AssetStudio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_Streams[str] = new StreamInfo
|
if (streamCount == 2 && s == 1)
|
||||||
|
{
|
||||||
|
offset = m_DataSize.Length - stride * m_VertexCount;
|
||||||
|
}
|
||||||
|
m_Streams[s] = new StreamInfo
|
||||||
{
|
{
|
||||||
channelMask = new BitArray(new[] { chnMask }),
|
channelMask = new BitArray(new[] { chnMask }),
|
||||||
offset = offset,
|
offset = offset,
|
||||||
@ -841,10 +848,6 @@ namespace AssetStudio
|
|||||||
offset += m_VertexCount * stride + ((m_VertexCount & 1) != 0 ? 8 : 0);
|
offset += m_VertexCount * stride + ((m_VertexCount & 1) != 0 ? 8 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//actual Vertex Buffer
|
|
||||||
byte[] m_DataSize = new byte[reader.ReadInt32()];
|
|
||||||
reader.Read(m_DataSize, 0, m_DataSize.Length);
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region compute FvF
|
#region compute FvF
|
||||||
|
Loading…
Reference in New Issue
Block a user