|
|
|
@ -20,6 +20,8 @@
|
|
|
|
#include <Atom/RPI.Public/AuxGeom/AuxGeomDraw.h>
|
|
|
|
#include <Atom/RPI.Public/AuxGeom/AuxGeomDraw.h>
|
|
|
|
#include <Atom/RPI.Public/ColorManagement/TransformColor.h>
|
|
|
|
#include <Atom/RPI.Public/ColorManagement/TransformColor.h>
|
|
|
|
#include <Atom/RPI.Public/Pass/PassSystemInterface.h>
|
|
|
|
#include <Atom/RPI.Public/Pass/PassSystemInterface.h>
|
|
|
|
|
|
|
|
#include <Atom/RPI.Public/Pass/PassFilter.h>
|
|
|
|
|
|
|
|
#include <Atom/RPI.Public/Pass/Specific/EnvironmentCubeMapPass.h>
|
|
|
|
#include <Atom/RPI.Public/RenderPipeline.h>
|
|
|
|
#include <Atom/RPI.Public/RenderPipeline.h>
|
|
|
|
#include <Atom/RPI.Public/Scene.h>
|
|
|
|
#include <Atom/RPI.Public/Scene.h>
|
|
|
|
#include <Atom/RPI.Public/View.h>
|
|
|
|
#include <Atom/RPI.Public/View.h>
|
|
|
|
@ -1070,7 +1072,18 @@ namespace AZ
|
|
|
|
segment.m_pipelineViewTag = viewTag;
|
|
|
|
segment.m_pipelineViewTag = viewTag;
|
|
|
|
if (!segment.m_view || segment.m_view->GetName() != viewName)
|
|
|
|
if (!segment.m_view || segment.m_view->GetName() != viewName)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
segment.m_view = RPI::View::CreateView(viewName, RPI::View::UsageShadow);
|
|
|
|
RPI::View::UsageFlags usageFlags = RPI::View::UsageShadow;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if the shadow is rendering in an EnvironmentCubeMapPass it also needs to be a ReflectiveCubeMap view,
|
|
|
|
|
|
|
|
// to filter out shadows from objects that are excluded from the cubemap
|
|
|
|
|
|
|
|
RPI::PassClassFilter<RPI::EnvironmentCubeMapPass> passFilter;
|
|
|
|
|
|
|
|
AZStd::vector<AZ::RPI::Pass*> cubeMapPasses = AZ::RPI::PassSystemInterface::Get()->FindPasses(passFilter);
|
|
|
|
|
|
|
|
if (!cubeMapPasses.empty())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
usageFlags |= RPI::View::UsageReflectiveCubeMap;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
segment.m_view = RPI::View::CreateView(viewName, usageFlags);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|