From 641037e30c11cac03cb67066cef502c2062d2149 Mon Sep 17 00:00:00 2001 From: rgba16f <82187279+rgba16f@users.noreply.github.com> Date: Tue, 4 Jan 2022 15:40:10 -0600 Subject: [PATCH] Revert "added pass class (#6244)" This reverts commit 515e363151185c1270838f8155cf08e198549ed5. Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com> --- .../Assets/Passes/DiffuseComposite.pass | 2 +- .../Code/Source/CommonSystemComponent.cpp | 2 - .../DiffuseCompositePass.cpp | 45 ------------------- .../DiffuseCompositePass.h | 36 --------------- .../Code/atom_feature_common_files.cmake | 2 - 5 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseCompositePass.cpp delete mode 100644 Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseCompositePass.h diff --git a/Gems/Atom/Feature/Common/Assets/Passes/DiffuseComposite.pass b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseComposite.pass index 3ad5c06c90..615ee8a162 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/DiffuseComposite.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/DiffuseComposite.pass @@ -5,7 +5,7 @@ "ClassData": { "PassTemplate": { "Name": "DiffuseCompositePassTemplate", - "PassClass": "DiffuseCompositePass", + "PassClass": "FullScreenTriangle", "Slots": [ { "Name": "DownsampledIrradianceInput", diff --git a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp index 04098f5c20..a06defff08 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp @@ -96,7 +96,6 @@ #include #include #include -#include #include #include #include @@ -279,7 +278,6 @@ namespace AZ passSystem->AddPassCreator(Name("DiffuseProbeGridClassificationPass"), &Render::DiffuseProbeGridClassificationPass::Create); passSystem->AddPassCreator(Name("DiffuseProbeGridDownsamplePass"), &Render::DiffuseProbeGridDownsamplePass::Create); passSystem->AddPassCreator(Name("DiffuseProbeGridRenderPass"), &Render::DiffuseProbeGridRenderPass::Create); - passSystem->AddPassCreator(Name("DiffuseCompositePass"), &Render::DiffuseCompositePass::Create); passSystem->AddPassCreator(Name("LuminanceHistogramGeneratorPass"), &LuminanceHistogramGeneratorPass::Create); diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseCompositePass.cpp b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseCompositePass.cpp deleted file mode 100644 index 0b0dfda391..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseCompositePass.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 diff --git a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseCompositePass.h b/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseCompositePass.h deleted file mode 100644 index 333c66ebea..0000000000 --- a/Gems/Atom/Feature/Common/Code/Source/DiffuseGlobalIllumination/DiffuseCompositePass.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 - * - */ -#pragma once - -#include - -namespace AZ -{ - namespace Render - { - //! A class for DiffuseComposite to allow for disabling - class DiffuseCompositePass final - : public RPI::FullscreenTrianglePass - { - AZ_RPI_PASS(DiffuseCompositePass); - - public: - AZ_RTTI(DiffuseCompositePass, "{F3DBEBCB-66F8-465C-A06B-DFA76B9D4856}", AZ::RPI::FullscreenTrianglePass); - AZ_CLASS_ALLOCATOR(DiffuseCompositePass, SystemAllocator, 0); - - ~DiffuseCompositePass() = default; - static RPI::Ptr Create(const RPI::PassDescriptor& descriptor); - - bool IsEnabled() const override; - - private: - DiffuseCompositePass(const RPI::PassDescriptor& descriptor); - - }; - } // namespace Render -} // namespace AZ \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake b/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake index 952085e136..375dbd9724 100644 --- a/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake +++ b/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake @@ -134,8 +134,6 @@ set(FILES Source/DiffuseGlobalIllumination/DiffuseProbeGridDownsamplePass.h Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.cpp Source/DiffuseGlobalIllumination/DiffuseProbeGridRenderPass.h - Source/DiffuseGlobalIllumination/DiffuseCompositePass.cpp - Source/DiffuseGlobalIllumination/DiffuseCompositePass.h Source/DiffuseGlobalIllumination/DiffuseProbeGrid.cpp Source/DiffuseGlobalIllumination/DiffuseProbeGrid.h Source/DiffuseGlobalIllumination/DiffuseProbeGridTextureReadback.cpp