You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/Atom/Feature/Common/Code/Source/PostProcessing/SMAANeighborhoodBlendingPass.h

57 lines
2.4 KiB
C++

/*
* 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 <Atom/Feature/PostProcessing/SMAAFeatureProcessorInterface.h>
#include <PostProcessing/SMAABasePass.h>
namespace AZ
{
namespace Render
{
static const char* const SMAANeighborhoodBlendingPassTemplateName = "SMAANeighborhoodBlendingTemplate";
//! The SMAA neighborhood blending pass implementation. The third pass of the SMAA applies anti-aliasing by blending with neighborhood pixels
//! using the blending weight texture output from previous pass.
class SMAANeighborhoodBlendingPass final
: public SMAABasePass
{
public:
AZ_RTTI(SMAANeighborhoodBlendingPass, "{EED89560-137F-4666-8E43-FF8A004F82A5}", SMAABasePass);
AZ_CLASS_ALLOCATOR(SMAANeighborhoodBlendingPass, SystemAllocator, 0);
virtual ~SMAANeighborhoodBlendingPass() = default;
//! Creates a SMAANeighborhoodBlendingPass
static RPI::Ptr<SMAANeighborhoodBlendingPass> Create(const RPI::PassDescriptor& descriptor);
void SetOutputMode(SMAAOutputMode mode);
private:
SMAANeighborhoodBlendingPass(const RPI::PassDescriptor& descriptor);
// Pass behavior overrides
void InitializeInternal() override;
// SMAABasePass functions...
void UpdateSRG() override;
void GetCurrentShaderOption(AZ::RPI::ShaderOptionGroup& shaderOption) const override;
RHI::ShaderInputNameIndex m_renderTargetMetricsShaderInputIndex = "m_renderTargetMetrics";
const AZ::Name m_blendingOutputModeOptionName;
// [GFX TODO][ATOM-3977] Since these parameters don't have control method, they are fixed at the moment. They will be controlled by feature processor in the future.
SMAAOutputMode m_outputMode = SMAAOutputMode::BlendResultWithProvisionalTonemap;
};
} // namespace Render
} // namespace AZ