Minor changes to DiffuseProbeGridDownsamplePass
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
This commit is contained in:
+12
-1
@@ -27,8 +27,19 @@ namespace AZ
|
||||
|
||||
bool DiffuseProbeGridDownsamplePass::IsEnabled() const
|
||||
{
|
||||
if (!Base::IsEnabled())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
RPI::Scene* scene = m_pipeline->GetScene();
|
||||
if (!scene)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// only enabled if there are DiffuseProbeGrids present in the scene
|
||||
DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = m_pipeline->GetScene()->GetFeatureProcessor<DiffuseProbeGridFeatureProcessor>();
|
||||
DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor<DiffuseProbeGridFeatureProcessor>();
|
||||
return (diffuseProbeGridFeatureProcessor && !diffuseProbeGridFeatureProcessor->GetProbeGrids().empty());
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -18,10 +18,11 @@ namespace AZ
|
||||
class DiffuseProbeGridDownsamplePass
|
||||
: public RPI::FullscreenTrianglePass
|
||||
{
|
||||
using Base = RPI::FullscreenTrianglePass;
|
||||
AZ_RPI_PASS(DiffuseProbeGridDownsamplePass);
|
||||
|
||||
public:
|
||||
AZ_RTTI(Render::DiffuseProbeGridDownsamplePass, "{B3331B68-F974-44D6-806B-2CFFB4B6B563}", FullscreenTrianglePass);
|
||||
AZ_RTTI(Render::DiffuseProbeGridDownsamplePass, "{B3331B68-F974-44D6-806B-2CFFB4B6B563}", Base);
|
||||
AZ_CLASS_ALLOCATOR(Render::DiffuseProbeGridDownsamplePass, SystemAllocator, 0);
|
||||
|
||||
//! Creates a new pass without a PassTemplate
|
||||
|
||||
Reference in New Issue
Block a user