Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessDownsample.h
Matthew Griffin bb70b349ce Merging CL 2804086 from //UE4/Release-4.11 to Dev-Main (//UE4/Dev-Main) to isolate copyright update
#lockdown Nick.Penwarden

[CL 2819020 by Matthew Griffin in Main branch]
2016-01-07 08:17:16 -05:00

41 lines
1.6 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
PostProcessDownsample.h: Post processing down sample implementation.
=============================================================================*/
#pragma once
#include "RenderingCompositionGraph.h"
#include "PostProcessing.h"
// derives from TRenderingCompositePassBase<InputCount, OutputCount>
// ePId_Input0: Color input
// ePId_Input1: optional depth input (then quality is ignores and it uses the a 4 sample unfiltered samples method)
class FRCPassPostProcessDownsample : public TRenderingCompositePassBase<2, 1>
{
public:
// constructor
// @param InDebugName we store the pointer so don't release this string
// @param Quality only used if ePId_Input1 is not set, 0:one filtered sample, 1:four filtered samples
FRCPassPostProcessDownsample(EPixelFormat InOverrideFormat = PF_Unknown,
uint32 InQuality = 1,
const TCHAR *InDebugName = TEXT("Downsample"));
// interface FRenderingCompositePass ---------
virtual void Process(FRenderingCompositePassContext& Context) override;
virtual void Release() override { delete this; }
virtual FPooledRenderTargetDesc ComputeOutputDesc(EPassOutputId InPassOutputId) const override;
private:
template <uint32 Method> static void SetShader(const FRenderingCompositePassContext& Context, const FPooledRenderTargetDesc* InputDesc);
EPixelFormat OverrideFormat;
// explained in constructor
uint32 Quality;
// must be a valid pointer
const TCHAR* DebugName;
bool IsDepthInputAvailable() const;
};