/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include #include namespace AZ { namespace Render { // --- Dedicated class for disabling --- RPI::Ptr DiffuseCompositePass::Create(const RPI::PassDescriptor& descriptor) { RPI::Ptr pass = aznew DiffuseCompositePass(descriptor); return AZStd::move(pass); } DiffuseCompositePass::DiffuseCompositePass(const RPI::PassDescriptor& descriptor) : RPI::FullscreenTrianglePass(descriptor) { } bool DiffuseCompositePass::IsEnabled() const { const RPI::Scene* scene = GetScene(); if (!scene) { return false; } DiffuseProbeGridFeatureProcessor* diffuseProbeGridFeatureProcessor = scene->GetFeatureProcessor(); if (!diffuseProbeGridFeatureProcessor || diffuseProbeGridFeatureProcessor->GetVisibleRealTimeProbeGrids().empty()) { // no diffuse probe grids return false; } return true; } } // namespace Render } // namespace AZ