Gems/Atom

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-16 15:56:10 -07:00
parent 8cef306efb
commit e6b5342c07
9 changed files with 39 additions and 37 deletions
@@ -539,9 +539,10 @@ namespace AZ::Render
{
esmPass->QueueForBuildAndInitialization();
}
for (ProjectedShadowmapsPass* shadowPass : m_projectedShadowmapsPasses)
if (!m_projectedShadowmapsPasses.empty())
{
const ProjectedShadowmapsPass* shadowPass = m_projectedShadowmapsPasses.front();
for (const auto& shadowProperty : shadowProperties)
{
const int16_t shadowIndexInSrg = shadowProperty.m_shadowId.GetIndex();
@@ -553,7 +554,6 @@ namespace AZ::Render
filterData.m_shadowmapOriginInSlice = origin.m_originInSlice;
m_deviceBufferNeedsUpdate = true;
}
break;
}
m_shadowmapPassNeedsUpdate = false;
@@ -571,8 +571,9 @@ namespace AZ::Render
void ProjectedShadowFeatureProcessor::PrepareViews(const PrepareViewsPacket&, AZStd::vector<AZStd::pair<RPI::PipelineViewTag, RPI::ViewPtr>>& outViews)
{
for (ProjectedShadowmapsPass* pass : m_projectedShadowmapsPasses)
if (!m_projectedShadowmapsPasses.empty())
{
ProjectedShadowmapsPass* pass = m_projectedShadowmapsPasses.front();
RPI::RenderPipeline* renderPipeline = pass->GetRenderPipeline();
if (renderPipeline)
{
@@ -598,7 +599,6 @@ namespace AZ::Render
outViews.emplace_back(AZStd::make_pair(viewTag, shadowProperty.m_shadowmapView));
}
}
break;
}
}
@@ -606,8 +606,9 @@ namespace AZ::Render
{
AZ_ATOM_PROFILE_FUNCTION("RPI", "ProjectedShadowFeatureProcessor: Render");
for (const ProjectedShadowmapsPass* pass : m_projectedShadowmapsPasses)
if (!m_projectedShadowmapsPasses.empty())
{
const ProjectedShadowmapsPass* pass = m_projectedShadowmapsPasses.front();
for (const RPI::ViewPtr& view : packet.m_views)
{
if (view->GetUsageFlags() & RPI::View::UsageFlags::UsageCamera)
@@ -622,7 +623,6 @@ namespace AZ::Render
m_filterParamBufferHandler.UpdateSrg(srg);
}
}
break;
}
}