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 <PostProcess/Bloom/BloomComponent.h>
namespace AZ
{
namespace Render
{
BloomComponent::BloomComponent(const BloomComponentConfig& config)
: BaseClass(config)
{
}
void BloomComponent::Reflect(AZ::ReflectContext* context)
{
BaseClass::Reflect(context);
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
{
serializeContext->Class<BloomComponent, BaseClass>();
}
if (auto behaviorContext = azrtti_cast<BehaviorContext*>(context))
{
behaviorContext->Class<BloomComponent>()->RequestBus("BloomRequestBus");
behaviorContext->ConstantProperty("BloomComponentTypeId", BehaviorConstant(Uuid(Bloom::BloomComponentTypeId)))
->Attribute(AZ::Script::Attributes::Module, "render")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common);
}
}
} // namespace Render
} // namespace AZ
@@ -0,0 +1,43 @@
/*
* 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/PostProcess/Bloom/BloomComponentConfig.h>
#include <Atom/Feature/PostProcess/Bloom/BloomConstants.h>
#include <PostProcess/Bloom/BloomComponentController.h>
namespace AZ
{
namespace Render
{
namespace Bloom
{
static constexpr const char* const BloomComponentTypeId = "{0D38705D-525D-4BA7-A805-26E3E9093F54}";
}
class BloomComponent final
: public AzFramework::Components::ComponentAdapter<BloomComponentController, BloomComponentConfig>
{
public:
using BaseClass = AzFramework::Components::ComponentAdapter<BloomComponentController, BloomComponentConfig>;
AZ_COMPONENT(AZ::Render::BloomComponent, Bloom::BloomComponentTypeId, BaseClass);
BloomComponent() = default;
BloomComponent(const BloomComponentConfig& config);
static void Reflect(AZ::ReflectContext* context);
};
} // namespace Render
} // namespace AZ
@@ -0,0 +1,67 @@
/*
* 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/PostProcess/Bloom/BloomComponentConfig.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/Serialization/EditContext.h>
namespace AZ
{
namespace Render
{
void BloomComponentConfig::Reflect(ReflectContext* context)
{
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
{
serializeContext->Class<BloomComponentConfig, ComponentConfig>()
->Version(0)
// Auto-gen serialize context code...
#define SERIALIZE_CLASS BloomComponentConfig
#include <Atom/Feature/ParamMacros/StartParamSerializeContext.inl>
#include <Atom/Feature/PostProcess/Bloom/BloomParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
#undef SERIALIZE_CLASS
;
}
}
void BloomComponentConfig::CopySettingsFrom(BloomSettingsInterface* settings)
{
if (!settings)
{
return;
}
#define COPY_SOURCE settings
#include <Atom/Feature/ParamMacros/StartParamCopySettingsFrom.inl>
#include <Atom/Feature/PostProcess/Bloom/BloomParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
#undef COPY_SOURCE
}
void BloomComponentConfig::CopySettingsTo(BloomSettingsInterface* settings)
{
if (!settings)
{
return;
}
#define COPY_TARGET settings
#include <Atom/Feature/ParamMacros/StartParamCopySettingsTo.inl>
#include <Atom/Feature/PostProcess/Bloom/BloomParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
#undef COPY_TARGET
}
} // namespace Render
} // namespace AZ
@@ -0,0 +1,167 @@
/*
* 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 <PostProcess/Bloom/BloomComponentController.h>
namespace AZ
{
namespace Render
{
void BloomComponentController::Reflect(ReflectContext* context)
{
BloomComponentConfig::Reflect(context);
if (auto* serializeContext = azrtti_cast<SerializeContext*>(context))
{
serializeContext->Class<BloomComponentController>()
->Version(0)
->Field("Configuration", &BloomComponentController::m_configuration);
}
if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
{
behaviorContext->EBus<BloomRequestBus>("BloomRequestBus")
->Attribute(AZ::Script::Attributes::Module, "render")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
// Auto-gen behavior context...
#define PARAM_EVENT_BUS BloomRequestBus::Events
#include <Atom/Feature/ParamMacros/StartParamBehaviorContext.inl>
#include <Atom/Feature/PostProcess/Bloom/BloomParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
#undef PARAM_EVENT_BUS
;
}
}
void BloomComponentController::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
{
provided.push_back(AZ_CRC_CE("BloomService"));
}
void BloomComponentController::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
{
incompatible.push_back(AZ_CRC_CE("BloomService"));
}
void BloomComponentController::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
{
required.push_back(AZ_CRC_CE("PostFXLayerService"));
}
BloomComponentController::BloomComponentController(const BloomComponentConfig& config)
: m_configuration(config)
{
}
void BloomComponentController::Activate(EntityId entityId)
{
m_entityId = entityId;
PostProcessFeatureProcessorInterface* fp = RPI::Scene::GetFeatureProcessorForEntity<PostProcessFeatureProcessorInterface>(m_entityId);
if (fp)
{
m_postProcessInterface = fp->GetOrCreateSettingsInterface(m_entityId);
if (m_postProcessInterface)
{
m_settingsInterface = m_postProcessInterface->GetOrCreateBloomSettingsInterface();
OnConfigChanged();
}
}
BloomRequestBus::Handler::BusConnect(m_entityId);
}
void BloomComponentController::Deactivate()
{
BloomRequestBus::Handler::BusDisconnect(m_entityId);
if (m_postProcessInterface)
{
m_postProcessInterface->RemoveBloomSettingsInterface();
}
m_postProcessInterface = nullptr;
m_settingsInterface = nullptr;
m_entityId.SetInvalid();
}
// Getters & Setters...
void BloomComponentController::SetConfiguration(const BloomComponentConfig& config)
{
m_configuration = config;
OnConfigChanged();
}
const BloomComponentConfig& BloomComponentController::GetConfiguration() const
{
return m_configuration;
}
void BloomComponentController::OnConfigChanged()
{
if (m_settingsInterface)
{
m_configuration.CopySettingsTo(m_settingsInterface);
m_settingsInterface->OnConfigChanged();
}
}
// Auto-gen getter/setter function definitions...
// 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 BloomComponentController::Get##Name() const \
{ \
return m_configuration.MemberName; \
} \
void BloomComponentController::Set##Name(ValueType val) \
{ \
if(m_settingsInterface) \
{ \
m_settingsInterface->Set##Name(val); \
m_settingsInterface->OnConfigChanged(); \
m_configuration.MemberName = m_settingsInterface->Get##Name(); \
} \
else \
{ \
m_configuration.MemberName = val; \
} \
} \
#define AZ_GFX_COMMON_OVERRIDE(ValueType, Name, MemberName, OverrideValueType) \
OverrideValueType BloomComponentController::Get##Name##Override() const \
{ \
return m_configuration.MemberName##Override; \
} \
void BloomComponentController::Set##Name##Override(OverrideValueType val) \
{ \
m_configuration.MemberName##Override = val; \
if(m_settingsInterface) \
{ \
m_settingsInterface->Set##Name##Override(val); \
m_settingsInterface->OnConfigChanged(); \
} \
} \
#include <Atom/Feature/ParamMacros/MapAllCommon.inl>
#include <Atom/Feature/PostProcess/Bloom/BloomParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
} // namespace Render
} // namespace AZ
@@ -0,0 +1,66 @@
/*
* 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 <AzCore/Component/TransformBus.h>
#include <AtomLyIntegration/CommonFeatures/PostProcess/Bloom/BloomBus.h>
#include <AtomLyIntegration/CommonFeatures/PostProcess/Bloom/BloomComponentConfig.h>
#include <Atom/Feature/PostProcess/Bloom/BloomConstants.h>
#include <Atom/Feature/PostProcess/Bloom/BloomSettingsInterface.h>
#include <Atom/Feature/PostProcess/PostProcessSettingsInterface.h>
#include <Atom/Feature/PostProcess/PostProcessFeatureProcessorInterface.h>
namespace AZ
{
namespace Render
{
class BloomComponentController final
: public BloomRequestBus::Handler
{
public:
friend class EditorBloomComponent;
AZ_TYPE_INFO(AZ::Render::BloomComponentController, "{502896C1-FF04-4BA7-833B-BA80946FA0DD}");
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);
BloomComponentController() = default;
BloomComponentController(const BloomComponentConfig& config);
void Activate(EntityId entityId);
void Deactivate();
void SetConfiguration(const BloomComponentConfig& config);
const BloomComponentConfig& GetConfiguration() const;
// Auto-gen function override declarations (functions definitions in .cpp)...
#include <Atom/Feature/ParamMacros/StartParamFunctionsOverride.inl>
#include <Atom/Feature/PostProcess/Bloom/BloomParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
private:
AZ_DISABLE_COPY(BloomComponentController);
void OnConfigChanged();
PostProcessSettingsInterface* m_postProcessInterface = nullptr;
BloomSettingsInterface* m_settingsInterface = nullptr;
BloomComponentConfig m_configuration;
EntityId m_entityId;
};
}
}
@@ -0,0 +1,177 @@
/*
* 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 <PostProcess/Bloom/EditorBloomComponent.h>
namespace AZ
{
namespace Render
{
void EditorBloomComponent::Reflect(AZ::ReflectContext* context)
{
BaseClass::Reflect(context);
if (AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
{
serializeContext->Class<EditorBloomComponent, BaseClass>()
->Version(1);
if (AZ::EditContext* editContext = serializeContext->GetEditContext())
{
editContext->Class<EditorBloomComponent>(
"Bloom", "Controls the Bloom")
->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-2672][PostFX] need create page for PostProcessing.
;
editContext->Class<BloomComponentController>(
"ExposureControlComponentController", "")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
->DataElement(AZ::Edit::UIHandlers::Default, &BloomComponentController::m_configuration, "Configuration", "")
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
;
editContext->Class<BloomComponentConfig>("BloomComponentConfig", "")
->DataElement(Edit::UIHandlers::CheckBox,
&BloomComponentConfig::m_enabled,
"Enable Bloom",
"Enable Bloom.")
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->DataElement(AZ::Edit::UIHandlers::Default, &BloomComponentConfig::m_threshold, "Threshold", "How bright is the light source bloom applied to ")
->Attribute(AZ::Edit::Attributes::Min, 0.0)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::Slider, &BloomComponentConfig::m_knee, "Knee", "Soft knee to smoothen edge of threshold")
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
->Attribute(AZ::Edit::Attributes::Max, 1.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::Default, &BloomComponentConfig::m_intensity, "Intensity", "Brightness of bloom")
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::CheckBox, &BloomComponentConfig::m_enableBicubic, "Enable Bicubic", "Enable bicubic filter for upsampling")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
// Kernel sizes
->ClassElement(AZ::Edit::ClassElements::Group, "Kernel Size")
->Attribute(AZ::Edit::Attributes::AutoExpand, false)
->DataElement(AZ::Edit::UIHandlers::Slider, &BloomComponentConfig::m_kernelSizeScale,
"Kernel Size Scale", "Global scaling factor of kernel size")
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
->Attribute(AZ::Edit::Attributes::Max, 2.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify,
Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::Slider, &BloomComponentConfig::m_kernelSizeStage0, "Kernel Size 0", "Kernel size for blur stage 0 in percent of screen width")
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
->Attribute(AZ::Edit::Attributes::Max, 1.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::Slider, &BloomComponentConfig::m_kernelSizeStage1, "Kernel Size 1", "Kernel size for blur stage 1 in percent of screen width")
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
->Attribute(AZ::Edit::Attributes::Max, 1.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::Slider, &BloomComponentConfig::m_kernelSizeStage2, "Kernel Size 2", "Kernel size for blur stage 2 in percent of screen width")
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
->Attribute(AZ::Edit::Attributes::Max, 1.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::Slider, &BloomComponentConfig::m_kernelSizeStage3, "Kernel Size 3", "Kernel size for blur stage 3 in percent of screen width")
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
->Attribute(AZ::Edit::Attributes::Max, 1.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::Slider, &BloomComponentConfig::m_kernelSizeStage4, "Kernel Size 4", "Kernel size for blur stage 4 in percent of screen width")
->Attribute(AZ::Edit::Attributes::Min, 0.0f)
->Attribute(AZ::Edit::Attributes::Max, 1.0f)
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
// Tints
->ClassElement(AZ::Edit::ClassElements::Group, "Tint")
->Attribute(AZ::Edit::Attributes::AutoExpand, false)
->DataElement(AZ::Edit::UIHandlers::Color, &BloomComponentConfig::m_tintStage0, "Tint 0", "Tint for blur stage 0")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::Color, &BloomComponentConfig::m_tintStage1, "Tint 1", "Tint for blur stage 1")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::Color, &BloomComponentConfig::m_tintStage2, "Tint 2", "Tint for blur stage 2")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::Color, &BloomComponentConfig::m_tintStage3, "Tint 3", "Tint for blur stage 3")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
->DataElement(AZ::Edit::UIHandlers::Color, &BloomComponentConfig::m_tintStage4, "Tint 4", "Tint for blur stage 4")
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
->Attribute(Edit::Attributes::ReadOnly, &BloomComponentConfig::ArePropertiesReadOnly)
// Overrides
->ClassElement(AZ::Edit::ClassElements::Group, "Overrides")
->Attribute(AZ::Edit::Attributes::AutoExpand, false)
// Auto-gen editor context settings for overrides
#define EDITOR_CLASS BloomComponentConfig
#include <Atom/Feature/ParamMacros/StartOverrideEditorContext.inl>
#include <Atom/Feature/PostProcess/Bloom/BloomParams.inl>
#include <Atom/Feature/ParamMacros/EndParams.inl>
#undef EDITOR_CLASS
;
}
}
if (auto behaviorContext = azrtti_cast<BehaviorContext*>(context))
{
behaviorContext->Class<EditorBloomComponent>()->RequestBus("BloomRequestBus");
behaviorContext->ConstantProperty("EditorBloomComponentTypeId", BehaviorConstant(Uuid(Bloom::EditorBloomComponentTypeId)))
->Attribute(AZ::Script::Attributes::Module, "render")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation);
}
}
EditorBloomComponent::EditorBloomComponent(const BloomComponentConfig& config)
: BaseClass(config)
{
}
u32 EditorBloomComponent::OnConfigurationChanged()
{
m_controller.OnConfigChanged();
return Edit::PropertyRefreshLevels::AttributesAndValues;
}
}
}
@@ -0,0 +1,47 @@
/*
* 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 <Atom/Feature/PostProcess/DepthOfField/DepthOfFieldConstants.h>
#include <PostProcess/Bloom/BloomComponent.h>
namespace AZ
{
namespace Render
{
namespace Bloom
{
static constexpr const char* const EditorBloomComponentTypeId =
"{33789179-AB9C-4891-9DA3-1972EAED6719}";
}
class EditorBloomComponent final
: public AzToolsFramework::Components::EditorComponentAdapter<BloomComponentController, BloomComponent, BloomComponentConfig>
{
public:
using BaseClass = AzToolsFramework::Components::EditorComponentAdapter<BloomComponentController, BloomComponent, BloomComponentConfig>;
AZ_EDITOR_COMPONENT(AZ::Render::EditorBloomComponent, Bloom::EditorBloomComponentTypeId, BaseClass);
static void Reflect(AZ::ReflectContext* context);
EditorBloomComponent() = default;
EditorBloomComponent(const BloomComponentConfig& config);
//! EditorRenderComponentAdapter overrides...
AZ::u32 OnConfigurationChanged() override;
};
} // namespace Render
} // namespace AZ