AtomLyIntegration

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-17 16:46:04 -07:00
committed by Esteban Papp
parent 97f9ac870d
commit eb2da69e6e
9 changed files with 26 additions and 26 deletions
@@ -212,7 +212,7 @@ namespace AZ
for (uint32_t vertexIndex = 0; vertexIndex < vertexCount; ++vertexIndex)
{
const uint32_t originalVertex = sourceOriginalVertex[vertexIndex + vertexStart];
const uint32_t influenceCount = AZStd::GetMin<uint32_t>(MaxSupportedSkinInfluences, sourceSkinningInfo->GetNumInfluences(originalVertex));
const uint32_t influenceCount = AZStd::GetMin<uint32_t>(MaxSupportedSkinInfluences, static_cast<uint32_t>(sourceSkinningInfo->GetNumInfluences(originalVertex)));
uint32_t influenceIndex = 0;
float weightError = 1.0f;
@@ -379,7 +379,7 @@ namespace AZ
size_t skinnedMeshSubmeshIndex = 0;
for (size_t jointIndex = 0; jointIndex < numJoints; ++jointIndex)
{
const EMotionFX::Mesh* mesh = actor->GetMesh(lodIndex, jointIndex);
const EMotionFX::Mesh* mesh = actor->GetMesh(static_cast<uint32>(lodIndex), static_cast<uint32>(jointIndex));
if (!mesh || mesh->GetIsCollisionMesh())
{
continue;
@@ -405,7 +405,7 @@ namespace AZ
for (size_t subMeshIndex = 0; subMeshIndex < numSubMeshes; ++subMeshIndex)
{
const EMotionFX::SubMesh* subMesh = mesh->GetSubMesh(subMeshIndex);
const EMotionFX::SubMesh* subMesh = mesh->GetSubMesh(static_cast<uint32>(subMeshIndex));
const size_t vertexCount = subMesh->GetNumVertices();
// Skip empty sub-meshes and sub-meshes that would put the total vertex count beyond the supported range
@@ -509,7 +509,7 @@ namespace AZ
if (morphBufferAssetView)
{
ProcessMorphsForLod(actor, morphBufferAssetView->GetBufferAsset(), lodIndex, fullFileName, skinnedMeshLod);
ProcessMorphsForLod(actor, morphBufferAssetView->GetBufferAsset(), static_cast<uint32_t>(lodIndex), fullFileName, skinnedMeshLod);
}
// Set colors after morphs are set, so that we know whether or not they are dynamic (if they exist)
@@ -594,7 +594,7 @@ namespace AZ
descriptor.m_bufferData = boneTransforms.data();
descriptor.m_bufferName = AZStd::string::format("BoneTransformBuffer_%s", actorInstance->GetActor()->GetName());
descriptor.m_byteCount = boneTransforms.size() * sizeof(float);
descriptor.m_elementSize = floatsPerBone * sizeof(float);
descriptor.m_elementSize = static_cast<uint32_t>(floatsPerBone * sizeof(float));
descriptor.m_poolType = RPI::CommonBufferPoolType::ReadOnly;
return RPI::BufferSystemInterface::Get()->CreateBufferFromCommonPool(descriptor);
}
@@ -163,7 +163,7 @@ namespace AZ
const AZ::Color skeletonColor(0.604f, 0.804f, 0.196f, 1.0f);
RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments lineArgs;
lineArgs.m_verts = m_auxVertices.data();
lineArgs.m_vertCount = m_auxVertices.size();
lineArgs.m_vertCount = static_cast<uint32_t>(m_auxVertices.size());
lineArgs.m_colors = &skeletonColor;
lineArgs.m_colorCount = 1;
lineArgs.m_depthTest = RPI::AuxGeomDraw::DepthTest::Off;
@@ -204,9 +204,9 @@ namespace AZ
RPI::AuxGeomDraw::AuxGeomDynamicDrawArguments lineArgs;
lineArgs.m_verts = m_auxVertices.data();
lineArgs.m_vertCount = m_auxVertices.size();
lineArgs.m_vertCount = static_cast<uint32_t>(m_auxVertices.size());
lineArgs.m_colors = m_auxColors.data();
lineArgs.m_colorCount = m_auxColors.size();
lineArgs.m_colorCount = static_cast<uint32_t>(m_auxColors.size());
lineArgs.m_depthTest = RPI::AuxGeomDraw::DepthTest::Off;
auxGeom->DrawLines(lineArgs);
}
@@ -786,7 +786,7 @@ namespace AZ
for (size_t lodIndex = 0; lodIndex < m_skinnedMeshInputBuffers->GetLodCount(); ++lodIndex)
{
EMotionFX::MorphSetup* morphSetup = actor->GetMorphSetup(lodIndex);
EMotionFX::MorphSetup* morphSetup = actor->GetMorphSetup(static_cast<uint32>(lodIndex));
if (morphSetup)
{
const AZStd::vector<AZ::RPI::MorphTargetMetaAsset::MorphTarget>& metaDatas = actor->GetMorphTargetMetaAsset()->GetMorphTargets();
@@ -836,7 +836,7 @@ namespace AZ
// Set the weights for any active masks
for (size_t i = 0; i < m_wrinkleMaskWeights.size(); ++i)
{
wrinkleMaskObjectSrg->SetConstant(wrinkleMaskWeightsIndex, m_wrinkleMaskWeights[i], i);
wrinkleMaskObjectSrg->SetConstant(wrinkleMaskWeightsIndex, m_wrinkleMaskWeights[i], static_cast<uint32_t>(i));
}
AZ_Error("AtomActorInstance", m_wrinkleMaskWeights.size() <= s_maxActiveWrinkleMasks, "The skinning shader supports no more than %d active morph targets with wrinkle masks.", s_maxActiveWrinkleMasks);
}