completed CompressedMesh

This commit is contained in:
Perfare 2018-09-09 05:06:34 +08:00
parent 3034dbc392
commit d7d56b4ad8

View File

@ -955,7 +955,7 @@ namespace AssetStudio
var m_FloatColors = new PackedFloatVector(reader); var m_FloatColors = new PackedFloatVector(reader);
if (m_FloatColors.m_NumItems > 0) if (m_FloatColors.m_NumItems > 0)
{ {
throw new NotImplementedException(); m_Colors = m_FloatColors.UnpackFloats(1, 4);
} }
} }
#endregion #endregion
@ -1039,7 +1039,14 @@ namespace AssetStudio
var m_Colors_Packed = new PackedIntVector(reader); var m_Colors_Packed = new PackedIntVector(reader);
if (m_Colors_Packed.m_NumItems > 0) if (m_Colors_Packed.m_NumItems > 0)
{ {
throw new NotImplementedException(); m_Colors_Packed.m_NumItems *= 4;
m_Colors_Packed.m_BitSize /= 4;
var tempColors = m_Colors_Packed.UnpackInts();
m_Colors = new float[m_Colors_Packed.m_NumItems];
for (int v = 0; v < m_Colors_Packed.m_NumItems; v++)
{
m_Colors[v] = tempColors[v] / 255f;
}
} }
} }
else else