Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> # Conflicts: # Code/Editor/CryEditDoc.cpp # Code/Editor/CryEditDoc.h # Code/Legacy/CryCommon/CryArray.h # Code/Legacy/CryCommon/CryString.h # Code/Legacy/CryCommon/UnicodeBinding.h # Code/Legacy/CrySystem/LocalizedStringManager.cpp # Gems/LyShine/Code/Source/StringUtfUtils.h # Gems/PhysXDebug/Code/Source/SystemComponent.cpp
This commit is contained in:
@@ -10,9 +10,6 @@
|
||||
|
||||
#include <Atom/Features/PostProcessing/PostProcessUtil.azsli>
|
||||
|
||||
// Indicates whether to use pre-multiplied alpha
|
||||
option bool o_preMultiplyAlpha;
|
||||
|
||||
// If true pixels with an alpha value of less than 0.5 are clipped
|
||||
option bool o_alphaTest;
|
||||
|
||||
@@ -86,9 +83,9 @@ struct PSOutput
|
||||
float4 m_color : SV_Target0;
|
||||
};
|
||||
|
||||
float4 SampleTriangleTexture(int texIndex, float2 uv)
|
||||
float4 SampleTriangleTexture(uint texIndex, float2 uv)
|
||||
{
|
||||
if ((InstanceSrg::m_isClamp & (1 << texIndex)) != 0)
|
||||
if ((InstanceSrg::m_isClamp & (1U << texIndex)) != 0)
|
||||
{
|
||||
return InstanceSrg::m_texture[texIndex].Sample(InstanceSrg::m_clampSampler, uv);
|
||||
}
|
||||
@@ -120,14 +117,6 @@ PSOutput MainPS(VSOutput IN)
|
||||
resColor.xyz = LinearToSRGB(resColor.xyz);
|
||||
}
|
||||
|
||||
// Check for flag to premultiply alpha
|
||||
if (o_preMultiplyAlpha)
|
||||
{
|
||||
// premultiply the color by the alpha. This would not be required if we had full access to the separate alpha blend mode
|
||||
float preMult = resColor.w;
|
||||
resColor.xyz *= preMult;
|
||||
}
|
||||
|
||||
// If the o_modulate option is not None it means that the verts have two texture indicies. The second texture is used to
|
||||
// mask the first. This is used for gradient masks.
|
||||
if (o_modulate == Modulate::Alpha)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
{
|
||||
"StableId": 1,
|
||||
"Options": {
|
||||
"o_preMultiplyAlpha": "false",
|
||||
"o_alphaTest": "false",
|
||||
"o_srgbWrite": "true",
|
||||
"o_modulate": "Modulate::None"
|
||||
@@ -13,11 +12,26 @@
|
||||
{
|
||||
"StableId": 2,
|
||||
"Options": {
|
||||
"o_preMultiplyAlpha": "false",
|
||||
"o_alphaTest": "true",
|
||||
"o_srgbWrite": "true",
|
||||
"o_alphaTest": "false",
|
||||
"o_srgbWrite": "false",
|
||||
"o_modulate": "Modulate::None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"StableId": 3,
|
||||
"Options": {
|
||||
"o_alphaTest": "true",
|
||||
"o_srgbWrite": "false",
|
||||
"o_modulate": "Modulate::None"
|
||||
}
|
||||
},
|
||||
{
|
||||
"StableId": 4,
|
||||
"Options": {
|
||||
"o_alphaTest": "false",
|
||||
"o_srgbWrite": "false",
|
||||
"o_modulate": "Modulate::Alpha"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+1
-1
@@ -238,7 +238,7 @@ namespace AZ
|
||||
|
||||
uint32_t AssetCollectionAsyncLoaderTestComponent::GetCountOfPendingAssets() const
|
||||
{
|
||||
return m_pendingAssets.size();
|
||||
return static_cast<uint32_t>(m_pendingAssets.size());
|
||||
}
|
||||
|
||||
bool AssetCollectionAsyncLoaderTestComponent::ValidateAssetWasLoaded(const AZStd::string& assetPath) const
|
||||
|
||||
@@ -332,7 +332,7 @@ void AZ::FFont::DrawStringUInternal(
|
||||
m_vertexBuffer[vertexOffset + 3].color.dcolor = packedColor;
|
||||
m_vertexBuffer[vertexOffset + 3].st = tc3;
|
||||
|
||||
uint16_t startingIndex = vertexOffset - startingVertexCount;
|
||||
uint16_t startingIndex = static_cast<uint16_t>(vertexOffset - startingVertexCount);
|
||||
m_indexBuffer[indexOffset + 0] = startingIndex + 0;
|
||||
m_indexBuffer[indexOffset + 1] = startingIndex + 1;
|
||||
m_indexBuffer[indexOffset + 2] = startingIndex + 2;
|
||||
@@ -704,12 +704,12 @@ uint32_t AZ::FFont::WriteTextQuadsToBuffers(SVF_P2F_C4B_T2F_F4B* verts, uint16_t
|
||||
vertexData[vertexOffset + 3].texIndex2 = 0;
|
||||
vertexData[vertexOffset + 3].pad = 0;
|
||||
|
||||
indexData[indexOffset + 0] = vertexOffset + 0;
|
||||
indexData[indexOffset + 1] = vertexOffset + 1;
|
||||
indexData[indexOffset + 2] = vertexOffset + 2;
|
||||
indexData[indexOffset + 3] = vertexOffset + 2;
|
||||
indexData[indexOffset + 4] = vertexOffset + 3;
|
||||
indexData[indexOffset + 5] = vertexOffset + 0;
|
||||
indexData[indexOffset + 0] = static_cast<uint16_t>(vertexOffset + 0);
|
||||
indexData[indexOffset + 1] = static_cast<uint16_t>(vertexOffset + 1);
|
||||
indexData[indexOffset + 2] = static_cast<uint16_t>(vertexOffset + 2);
|
||||
indexData[indexOffset + 3] = static_cast<uint16_t>(vertexOffset + 2);
|
||||
indexData[indexOffset + 4] = static_cast<uint16_t>(vertexOffset + 3);
|
||||
indexData[indexOffset + 5] = static_cast<uint16_t>(vertexOffset + 0);
|
||||
|
||||
vertexOffset += 4;
|
||||
indexOffset += 6;
|
||||
@@ -1343,7 +1343,7 @@ unsigned int AZ::FFont::GetEffectId(const char* effectName) const
|
||||
{
|
||||
if (!strcmp(m_effects[i].m_name.c_str(), effectName))
|
||||
{
|
||||
return i;
|
||||
return static_cast<unsigned int>(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1353,7 +1353,7 @@ unsigned int AZ::FFont::GetEffectId(const char* effectName) const
|
||||
|
||||
unsigned int AZ::FFont::GetNumEffects() const
|
||||
{
|
||||
return m_effects.size();
|
||||
return static_cast<unsigned int>(m_effects.size());
|
||||
}
|
||||
|
||||
const char* AZ::FFont::GetEffectName(unsigned int effectId) const
|
||||
|
||||
+1
-1
@@ -207,7 +207,7 @@ namespace AZ::Render
|
||||
createVertex(-0.5f, 0.5f, 0.f, 1.f)
|
||||
};
|
||||
AZStd::array<Indice, 6> indices = {0, 1, 2, 0, 2, 3};
|
||||
dynamicDraw->DrawIndexed(&vertices, vertices.size(), &indices, indices.size(), RHI::IndexFormat::Uint16, drawSrg);
|
||||
dynamicDraw->DrawIndexed(&vertices, static_cast<uint32_t>(vertices.size()), &indices, static_cast<uint32_t>(indices.size()), RHI::IndexFormat::Uint16, drawSrg);
|
||||
}
|
||||
|
||||
QString AtomViewportDisplayIconsSystemComponent::FindAssetPath(const QString& path) const
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ namespace AZ
|
||||
{
|
||||
transformedVertices.push_back(transform.TransformPoint(Vector3(vertex.GetX(), vertex.GetY(), 0.0f)));
|
||||
}
|
||||
GetFeatureProcessor()->SetPolygonPoints(GetLightHandle(), transformedVertices.data(), transformedVertices.size(), GetTransform().GetBasisZ());
|
||||
GetFeatureProcessor()->SetPolygonPoints(GetLightHandle(), transformedVertices.data(), static_cast<uint32_t>(transformedVertices.size()), GetTransform().GetBasisZ());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace AZ
|
||||
{
|
||||
EditorMeshStatsForLod stats;
|
||||
const auto& meshes = lodAsset->GetMeshes();
|
||||
stats.m_meshCount = meshes.size();
|
||||
stats.m_meshCount = static_cast<AZ::u32>(meshes.size());
|
||||
for (const auto& mesh : meshes)
|
||||
{
|
||||
stats.m_vertCount += mesh.GetVertexCount();
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace AZ
|
||||
{
|
||||
if (m_modelAsset.IsReady())
|
||||
{
|
||||
lodCount = m_modelAsset->GetLodCount();
|
||||
lodCount = static_cast<uint32_t>(m_modelAsset->GetLodCount());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -66,7 +66,7 @@ namespace AZ
|
||||
Data::Instance<RPI::Model> model = Data::InstanceDatabase<RPI::Model>::Instance().Find(Data::InstanceId::CreateFromAssetId(m_modelAsset.GetId()));
|
||||
if (model)
|
||||
{
|
||||
lodCount = model->GetLodCount();
|
||||
lodCount = static_cast<uint32_t>(model->GetLodCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,7 +211,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;
|
||||
|
||||
@@ -378,7 +378,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;
|
||||
@@ -404,7 +404,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
|
||||
@@ -508,7 +508,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)
|
||||
@@ -593,7 +593,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);
|
||||
}
|
||||
@@ -812,7 +812,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();
|
||||
@@ -862,7 +862,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);
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ namespace AZ
|
||||
void DebugConsole::BrowseInputHistory(ImGuiInputTextCallbackData* data)
|
||||
{
|
||||
const int previousHistoryIndex = m_currentHistoryIndex;
|
||||
const int maxHistoryIndex = m_textInputHistory.size() - 1;
|
||||
const int maxHistoryIndex = static_cast<int>(m_textInputHistory.size() - 1);
|
||||
switch (data->EventKey)
|
||||
{
|
||||
// Browse backwards through the history.
|
||||
|
||||
Reference in New Issue
Block a user