Initial commit

This commit is contained in:
alexpete
2021-03-05 11:26:34 -08:00
commit a10351f38d
27091 changed files with 5521199 additions and 0 deletions
@@ -0,0 +1,46 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <AzCore/RTTI/BehaviorContext.h>
#include <ScreenSpace/DeferredFogComponent.h>
namespace AZ
{
namespace Render
{
DeferredFogComponent::DeferredFogComponent(const DeferredFogComponentConfig& config)
: BaseClass(config)
{
}
void DeferredFogComponent::Reflect(AZ::ReflectContext* context)
{
BaseClass::Reflect(context);
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
{
serializeContext->Class<DeferredFogComponent, BaseClass>();
}
if (auto behaviorContext = azrtti_cast<BehaviorContext*>(context))
{
behaviorContext->Class<DeferredFogComponent>()->RequestBus("DeferredFogRequestsBus");
behaviorContext->ConstantProperty("DeferredFogComponentTypeId", BehaviorConstant(Uuid(DeferredFog::DeferredFogComponentTypeId)))
->Attribute(AZ::Script::Attributes::Module, "render")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common);
}
}
} // namespace Render
} // namespace AZ
@@ -0,0 +1,42 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <AzCore/Component/Component.h>
#include <AzFramework/Components/ComponentAdapter.h>
#include <AtomLyIntegration/CommonFeatures/ScreenSpace/DeferredFogComponentConfig.h>
#include <ScreenSpace/DeferredFogComponentController.h>
namespace AZ
{
namespace Render
{
namespace DeferredFog
{
static constexpr const char* const DeferredFogComponentTypeId = "{9492DC07-B3F7-4DF2-88FA-E4EEF1DD98E3}";
}
class DeferredFogComponent final
: public AzFramework::Components::ComponentAdapter<DeferredFogComponentController, DeferredFogComponentConfig>
{
public:
using BaseClass = AzFramework::Components::ComponentAdapter<DeferredFogComponentController, DeferredFogComponentConfig>;
AZ_COMPONENT(AZ::Render::DeferredFogComponent, DeferredFog::DeferredFogComponentTypeId, BaseClass);
DeferredFogComponent() = default;
DeferredFogComponent(const DeferredFogComponentConfig& config);
static void Reflect(AZ::ReflectContext* context);
};
} // namespace Render
} // namespace AZ
@@ -0,0 +1,80 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <AtomLyIntegration/CommonFeatures/ScreenSpace/DeferredFogComponentConfig.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/Serialization/EditContext.h>
namespace AZ
{
namespace Render
{
void DeferredFogComponentConfig::Reflect(ReflectContext* context)
{
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
{
serializeContext->Class<DeferredFogComponentConfig, ComponentConfig>()
->Version(1)
// Auto-gen serialize context code...
#define SERIALIZE_CLASS DeferredFogComponentConfig
#define AZ_GFX_COMMON_PARAM(ValueType, Name, MemberName, DefaultValue) \
->Field(#Name, &SERIALIZE_CLASS::MemberName) \
#include <Atom/Feature/ParamMacros/MapParamCommon.inl>
#include <Atom/Feature/ScreenSpace/DeferredFogParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
#undef SERIALIZE_CLASS
->Field("IsEnabled", &DeferredFogComponentConfig::m_enabled)
->Field("UseNoiseTextureShaderOption", &DeferredFogComponentConfig::m_useNoiseTextureShaderOption)
->Field("EnableFogLayerShaderOption", &DeferredFogComponentConfig::m_enableFogLayerShaderOption)
;
}
}
void DeferredFogComponentConfig::CopySettingsFrom(DeferredFogSettingsInterface* settings)
{
if (!settings)
{
return;
}
#define COPY_SOURCE settings
#define AZ_GFX_COMMON_PARAM(ValueType, Name, MemberName, DefaultValue) \
MemberName = COPY_SOURCE->Get##Name(); \
#include <Atom/Feature/ParamMacros/MapParamCommon.inl>
#include <Atom/Feature/ScreenSpace/DeferredFogParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
#undef COPY_SOURCE
}
void DeferredFogComponentConfig::CopySettingsTo(DeferredFogSettingsInterface* settings)
{
if (!settings)
{
return;
}
#define COPY_TARGET settings
#define AZ_GFX_COMMON_PARAM(ValueType, Name, MemberName, DefaultValue) \
COPY_TARGET->Set##Name(MemberName); \
#include <Atom/Feature/ParamMacros/MapParamCommon.inl>
#include <Atom/Feature/ScreenSpace/DeferredFogParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
#undef COPY_TARGET
}
} // namespace Render
} // namespace AZ
@@ -0,0 +1,166 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <AzCore/RTTI/BehaviorContext.h>
#include <Atom/RPI.Public/Scene.h>
#include <ScreenSpace/DeferredFogComponentController.h>
namespace AZ
{
namespace Render
{
void DeferredFogComponentController::Reflect(ReflectContext* context)
{
DeferredFogComponentConfig::Reflect(context);
if (auto* serializeContext = azrtti_cast<SerializeContext*>(context))
{
serializeContext->Class<DeferredFogComponentController>()
->Version(0)
->Field("Configuration", &DeferredFogComponentController::m_configuration);
}
if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
{
behaviorContext->EBus<DeferredFogRequestsBus>("DeferredFogRequestsBus")
->Attribute(AZ::Script::Attributes::Module, "render")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
// Auto-gen behavior context...
#define PARAM_EVENT_BUS DeferredFogRequestsBus::Events
#define AZ_GFX_COMMON_PARAM(ValueType, Name, MemberName, DefaultValue) \
->Event("Set" #Name, &PARAM_EVENT_BUS::Set##Name) \
->Event("Get" #Name, &PARAM_EVENT_BUS::Get##Name) \
->VirtualProperty(#Name, "Get" #Name, "Set" #Name) \
#include <Atom/Feature/ParamMacros/MapParamCommon.inl>
#include <Atom/Feature/ScreenSpace/DeferredFogParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
#undef PARAM_EVENT_BUS
;
}
}
void DeferredFogComponentController::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
{
provided.push_back(AZ_CRC_CE("DeferredFogService"));
}
void DeferredFogComponentController::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
{
incompatible.push_back(AZ_CRC_CE("DeferredFogService"));
}
void DeferredFogComponentController::GetRequiredServices( [[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
{ // In the future deferred fog might be required to be anchored to activation locations
required.push_back(AZ_CRC_CE("PostFXLayerService")); // For aggregated settings, otherwise settings are not updated
}
DeferredFogComponentController::DeferredFogComponentController(const DeferredFogComponentConfig& config)
: m_configuration(config)
{
}
void DeferredFogComponentController::Activate(EntityId entityId)
{
m_entityId = entityId;
PostProcessFeatureProcessorInterface* featureProcessor = RPI::Scene::GetFeatureProcessorForEntity<PostProcessFeatureProcessorInterface>(m_entityId);
if (featureProcessor)
{
m_postProcessInterface = featureProcessor->GetOrCreateSettingsInterface(m_entityId);
if (m_postProcessInterface)
{
m_settingsInterface = m_postProcessInterface->GetOrCreateDeferredFogSettingsInterface();
OnConfigChanged();
}
}
DeferredFogRequestsBus::Handler::BusConnect(m_entityId);
}
void DeferredFogComponentController::Deactivate()
{
DeferredFogRequestsBus::Handler::BusDisconnect(m_entityId);
if (m_postProcessInterface)
{
// turn off the lights before leaving
m_settingsInterface->SetEnabled(false);
m_settingsInterface->OnSettingsChanged();
// Now you can leave
m_postProcessInterface->RemoveDeferredFogSettingsInterface();
}
m_settingsInterface = nullptr;
m_entityId.SetInvalid();
}
void DeferredFogComponentController::SetConfiguration(const DeferredFogComponentConfig& config)
{
m_configuration = config;
OnConfigChanged();
}
const DeferredFogComponentConfig& DeferredFogComponentController::GetConfiguration() const
{
return m_configuration;
}
void DeferredFogComponentController::OnConfigChanged()
{
if (m_settingsInterface)
{
// Set SRG constants
m_configuration.CopySettingsTo(m_settingsInterface);
// Set the shader options bits
m_settingsInterface->SetEnableFogLayerShaderOption(m_configuration.GetEnableFogLayerShaderOption());
m_settingsInterface->SetUseNoiseTextureShaderOption(m_configuration.GetUseNoiseTextureShaderOption());
// Enable / disable the pass
m_settingsInterface->SetEnabled(m_configuration.GetIsEnabled());
m_settingsInterface->OnSettingsChanged();
}
}
// Auto generated getter/setter functions
// The setter functions will set the values on the Atom settings class, then get the value back
// from the settings class to set the local configuration. This is in case the settings class
// applies some custom logic that results in the set value being different from the input
#define AZ_GFX_COMMON_PARAM(ValueType, Name, MemberName, DefaultValue) \
ValueType DeferredFogComponentController::Get##Name() const \
{ \
return m_configuration.Get##Name(); \
} \
void DeferredFogComponentController::Set##Name(ValueType val) \
{ \
if(m_settingsInterface) \
{ \
m_configuration.Set##Name( val ); \
m_settingsInterface->Set##Name(val); \
m_settingsInterface->OnSettingsChanged(); \
} \
else \
{ \
m_configuration.Set##Name( val ); \
} \
} \
#include <Atom/Feature/ParamMacros/MapParamCommon.inl>
#include <Atom/Feature/ScreenSpace/DeferredFogParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
} // namespace Render
} // namespace AZ
@@ -0,0 +1,74 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <AzCore/Math/Vector2.h>
#include <AzCore/Math/Vector3.h>
#include <AzCore/Component/Component.h>
#include <AzCore/Component/TransformBus.h>
#include <AtomLyIntegration/CommonFeatures/ScreenSpace/DeferredFogBus.h>
#include <AtomLyIntegration/CommonFeatures/ScreenSpace/DeferredFogComponentConfig.h>
#include <Atom/Feature/ScreenSpace/DeferredFogSettingsInterface.h>
#include <Atom/Feature/PostProcess/PostProcessFeatureProcessorInterface.h>
#include <Atom/Feature/PostProcess/PostProcessSettingsInterface.h>
namespace AZ
{
namespace Render
{
class DeferredFogComponentController final
: public DeferredFogRequestsBus::Handler
{
public:
friend class EditorDeferredFogComponent;
AZ_TYPE_INFO(AZ::Render::DeferredFogComponentController, "{60B71D4C-1655-4C3A-BF14-CF6639B018CA}");
static void Reflect(AZ::ReflectContext* context);
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
DeferredFogComponentController() = default;
DeferredFogComponentController(const DeferredFogComponentConfig& config);
void Activate(EntityId entityId);
void Deactivate();
void SetConfiguration(const DeferredFogComponentConfig& config);
const DeferredFogComponentConfig& GetConfiguration() const;
// Getter / Setter methods override declarations
// Generate Get / Set methods
#define AZ_GFX_COMMON_PARAM(ValueType, Name, MemberName, DefaultValue) \
ValueType Get##Name() const override; \
void Set##Name(ValueType val) override; \
#include <Atom/Feature/ParamMacros/MapParamCommon.inl>
#include <Atom/Feature/ScreenSpace/DeferredFogParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
private:
AZ_DISABLE_COPY(DeferredFogComponentController);
void OnConfigChanged();
PostProcessSettingsInterface* m_postProcessInterface = nullptr;
DeferredFogSettingsInterface* m_settingsInterface = nullptr; // interface into the single setting structure
DeferredFogComponentConfig m_configuration; // configuration / settings per entity component - several can co-exist
EntityId m_entityId;
};
}
}
@@ -0,0 +1,164 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <AzCore/RTTI/BehaviorContext.h>
#include <ScreenSpace/EditorDeferredFogComponent.h>
namespace AZ
{
namespace Render
{
void EditorDeferredFogComponent::Reflect(AZ::ReflectContext* context)
{
BaseClass::Reflect(context);
if (AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
{
serializeContext->Class<EditorDeferredFogComponent, BaseClass>()
->Version(1);
if (AZ::EditContext* editContext = serializeContext->GetEditContext())
{
editContext->Class<EditorDeferredFogComponent>(
"Deferred Fog", "Controls the Deferred Fog")
->ClassElement(Edit::ClassElements::EditorData, "")
->Attribute(Edit::Attributes::Category, "Atom")
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/Component_Placeholder.svg") // [GFX TODO ATOM-2672][PostFX] need to create icons for PostProcessing.
->Attribute(AZ::Edit::Attributes::ViewportIcon, "editor/icons/components/viewport/component_placeholder.png") // [GFX TODO ATOM-2672][PostFX] need to create icons for PostProcessing.
->Attribute(Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c))
->Attribute(Edit::Attributes::AutoExpand, true)
->Attribute(Edit::Attributes::HelpPageURL, "https://") // [TODO][ATOM-13427] Create Wiki for Deferred Fog
;
editContext->Class<DeferredFogComponentController>(
"DeferredFogComponentController", "")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
->DataElement(AZ::Edit::UIHandlers::Default, &DeferredFogComponentController::m_configuration, "Configuration", "")
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
;
editContext->Class<DeferredFogComponentConfig>(
"DeferredFogComponentConfig", "")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->DataElement(Edit::UIHandlers::CheckBox,
&DeferredFogComponentConfig::m_enabled,
"Enable Deferred Fog",
"Enable Deferred Fog.")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(AZ::Edit::UIHandlers::Color, &DeferredFogComponentConfig::m_fogColor,
"Fog Color", "The fog color.")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(AZ::Edit::UIHandlers::Slider, &DeferredFogComponentConfig::m_fogStartDistance,
"Fog Start Distance", "The distance from the viewer when the fog starts")
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
->Attribute(AZ::Edit::Attributes::Max, 5000.0f)
->Attribute(AZ::Edit::Attributes::SoftMin, 0.0f)
->Attribute(AZ::Edit::Attributes::SoftMax, 10.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(AZ::Edit::UIHandlers::Slider, &DeferredFogComponentConfig::m_fogEndDistance,
"Fog End Distance", "At what distance from the viewer does the fog take over and mask the background scene out")
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
->Attribute(AZ::Edit::Attributes::Max, 5000.0f)
->Attribute(AZ::Edit::Attributes::SoftMin, 0.0f)
->Attribute(AZ::Edit::Attributes::SoftMax, 100.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
// Fog layer properties
->DataElement(Edit::UIHandlers::CheckBox,
&DeferredFogComponentConfig::m_enableFogLayerShaderOption,
"Enable Fog Layer",
"Enable Fog Layer")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(AZ::Edit::UIHandlers::Slider, &DeferredFogComponentConfig::m_fogMinHeight,
"Fog Bottom Height", "The height at which the fog layer starts")
->Attribute(AZ::Edit::Attributes::Min, -5000.0f)
->Attribute(AZ::Edit::Attributes::Max, 5000.0f)
->Attribute(AZ::Edit::Attributes::SoftMin, -100.0f)
->Attribute(AZ::Edit::Attributes::SoftMax, 1000.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(AZ::Edit::UIHandlers::Slider, &DeferredFogComponentConfig::m_fogMaxHeight,
"Fog Max Height", "The height of the fog layer top")
->Attribute(AZ::Edit::Attributes::Min, -5000.0f)
->Attribute(AZ::Edit::Attributes::Max, 5000.0f)
->Attribute(AZ::Edit::Attributes::SoftMin, -100.0f)
->Attribute(AZ::Edit::Attributes::SoftMax, 1000.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
// Fog turbulence properties
->DataElement(Edit::UIHandlers::CheckBox,
&DeferredFogComponentConfig::m_useNoiseTextureShaderOption,
"Enable Turbulence Properties",
"Enable Turbulence Properties")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(AZ::Edit::UIHandlers::LineEdit, &DeferredFogComponentConfig::m_noiseTexture,
"Noise Texture", "The noise texture used for creating the fog turbulence")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
// First noise octave
->DataElement(AZ::Edit::UIHandlers::Vector2, &DeferredFogComponentConfig::m_noiseScaleUV,
"Noise Texture First Octave Scale", "The scale of the first noise octave - higher indicates higher frequency / repetition")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(AZ::Edit::UIHandlers::Vector2, &DeferredFogComponentConfig::m_noiseVelocityUV,
"Noise Texture First Octave Velocity", "The velocity of the first noise octave UV coordinates")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
// Second noise octave
->DataElement(AZ::Edit::UIHandlers::Vector2, &DeferredFogComponentConfig::m_noiseScaleUV2,
"Noise Texture Second Octave Scale", "The scale of the second noise octave - higher indicates higher frequency / repetition")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(AZ::Edit::UIHandlers::Vector2, &DeferredFogComponentConfig::m_noiseVelocityUV2,
"Noise Texture Second Octave Velocity", "The velocity of the second noise octave UV coordinates")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(AZ::Edit::UIHandlers::Slider, &DeferredFogComponentConfig::m_octavesBlendFactor,
"Octaves Blend Factor", "The blend factor between the noise octaves")
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
->Attribute(AZ::Edit::Attributes::Max, 1.0f)
->Attribute(AZ::Edit::Attributes::SoftMin, 0.2f)
->Attribute(AZ::Edit::Attributes::SoftMax, 0.8f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
;
}
}
if (auto behaviorContext = azrtti_cast<BehaviorContext*>(context))
{
behaviorContext->Class<EditorDeferredFogComponent>()->RequestBus("DeferredFogRequestsBus");
behaviorContext->ConstantProperty("EditorDeferredFogComponentTypeId", BehaviorConstant(Uuid(DeferredFog::EditorDeferredFogComponentTypeId)))
->Attribute(AZ::Script::Attributes::Module, "render")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation);
}
}
EditorDeferredFogComponent::EditorDeferredFogComponent(const DeferredFogComponentConfig& config)
: BaseClass(config)
{
}
u32 EditorDeferredFogComponent::OnConfigurationChanged()
{
m_controller.OnConfigChanged();
return Edit::PropertyRefreshLevels::AttributesAndValues;
}
}
}
@@ -0,0 +1,46 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <AzToolsFramework/ToolsComponents/EditorComponentAdapter.h>
#include <ScreenSpace/DeferredFogComponent.h>
namespace AZ
{
namespace Render
{
namespace DeferredFog
{
static constexpr const char* const EditorDeferredFogComponentTypeId =
"{6459274F-54C8-4C22-9448-B2B13B69182C}";
}
class EditorDeferredFogComponent final
: public AzToolsFramework::Components::EditorComponentAdapter<DeferredFogComponentController, DeferredFogComponent, DeferredFogComponentConfig>
{
public:
using BaseClass = AzToolsFramework::Components::EditorComponentAdapter<DeferredFogComponentController, DeferredFogComponent, DeferredFogComponentConfig>;
AZ_EDITOR_COMPONENT(AZ::Render::EditorDeferredFogComponent, DeferredFog::EditorDeferredFogComponentTypeId, BaseClass);
static void Reflect(AZ::ReflectContext* context);
EditorDeferredFogComponent() = default;
EditorDeferredFogComponent(const DeferredFogComponentConfig& config);
//! EditorRenderComponentAdapter overrides...
AZ::u32 OnConfigurationChanged() override;
};
} // namespace Render
} // namespace AZ