Skip to content

Commit 88976dd

Browse files
Shadow culling review adjustments
Signed-off-by: Mateusz Wasilewski <[email protected]>
1 parent 86326ed commit 88976dd

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -686,19 +686,16 @@ namespace AZ::Render
686686
{
687687
uint16_t shadowIndex = shadowProperty.m_shadowId.GetIndex();
688688
const FilterParameter& filterData = m_shadowData.GetElement<FilterParamIndex>(shadowIndex);
689-
bool needsRender = filterData.m_shadowmapSize != aznumeric_cast<uint32_t>(ShadowmapSize::None);
690-
if (!needsRender)
689+
if (filterData.m_shadowmapSize == aznumeric_cast<uint32_t>(ShadowmapSize::None))
691690
{
692691
continue;
693692
}
694693
auto lightPosition = shadowProperty.m_desc.m_transform.GetTranslation();
695694
if (cullShadowmapOutsideViewFrustum &&
696695
!IsLightInsideAnyViewFrustum(mainViewFrustums, lightPosition, shadowProperty.m_desc.m_farPlaneDistance))
697696
{
698-
shadowProperty.m_shadowmapPass->SetEnabled(false);
699697
continue;
700698
}
701-
shadowProperty.m_shadowmapPass->SetEnabled(true);
702699

703700
const RPI::PipelineViewTag& viewTag = shadowProperty.m_shadowmapPass->GetPipelineViewTag();
704701
const RHI::DrawListMask drawListMask = renderPipeline->GetDrawListMask(viewTag);

Gems/Atom/RPI/Code/Include/Atom/RPI.Public/FeatureProcessor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ namespace AZ
4646
: public SceneNotificationBus::Handler
4747
{
4848
friend class Scene;
49-
public:
5049

5150
public:
5251
struct PrepareViewsPacket

0 commit comments

Comments
 (0)