Integrating github/staging through commit 5f214be

This commit is contained in:
alexpete
2021-04-13 17:18:57 -07:00
parent 2a9dfb7a1d
commit 8469c9ca0a
904 changed files with 9289 additions and 7157 deletions
@@ -18,7 +18,7 @@ namespace AZ::RPI
PackedCompressedMorphTargetDelta PackMorphTargetDelta(const CompressedMorphTargetDelta& compressedDelta)
{
PackedCompressedMorphTargetDelta packedDelta{ 0,0,0,0,0,{0,0,0} };
PackedCompressedMorphTargetDelta packedDelta{ 0,0,0,0,0,0,{0,0} };
packedDelta.m_morphedVertexIndex = compressedDelta.m_morphedVertexIndex;
// Position x is in the most significant 16 bits, y is in the least significant 16 bits
@@ -45,6 +45,12 @@ namespace AZ::RPI
packedDelta.m_padBitangentXYZ |= static_cast<uint32_t>(compressedDelta.m_bitangentY) << 8;
packedDelta.m_padBitangentXYZ |= static_cast<uint32_t>(compressedDelta.m_bitangentZ);
// Colors are in the least significant 24 bits (8 bits per channel)
packedDelta.m_colorRGBA |= static_cast<uint32_t>(compressedDelta.m_colorR) << 24;
packedDelta.m_colorRGBA |= static_cast<uint32_t>(compressedDelta.m_colorG) << 16;
packedDelta.m_colorRGBA |= static_cast<uint32_t>(compressedDelta.m_colorB) << 8;
packedDelta.m_colorRGBA |= static_cast<uint32_t>(compressedDelta.m_colorA);
return packedDelta;
}
@@ -77,6 +83,12 @@ namespace AZ::RPI
compressedDelta.m_bitangentY = (packedDelta.m_padBitangentXYZ >> 8 ) & 0x000000FF;
compressedDelta.m_bitangentZ = packedDelta.m_padBitangentXYZ & 0x000000FF;
// Colors are 4 channels, 8 bits per channel
compressedDelta.m_colorR = (packedDelta.m_colorRGBA >> 24) & 0x000000FF;
compressedDelta.m_colorG = (packedDelta.m_colorRGBA >> 16) & 0x000000FF;
compressedDelta.m_colorB = (packedDelta.m_colorRGBA >> 8) & 0x000000FF;
compressedDelta.m_colorA = packedDelta.m_colorRGBA & 0x000000FF;
return compressedDelta;
}
} // namespace AZ::RPI