2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
/*=============================================================================
|
|
|
|
|
PostProcessUpscale.h: Post processing Upscale implementation.
|
|
|
|
|
=============================================================================*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "RenderingCompositionGraph.h"
|
|
|
|
|
|
|
|
|
|
// derives from TRenderingCompositePassBase<InputCount, OutputCount>
|
|
|
|
|
// ePId_Input0: SceneColor (bilinear)
|
|
|
|
|
// ePId_Input1: SceneColor (point)
|
|
|
|
|
class FRCPassPostProcessUpscale : public TRenderingCompositePassBase<2, 1>
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
// constructor
|
2014-11-03 16:17:18 -05:00
|
|
|
// @param InUpscaleQuality - value denoting Upscale method to use:
|
2014-03-14 14:13:41 -04:00
|
|
|
// 0: Nearest
|
|
|
|
|
// 1: Bilinear
|
|
|
|
|
// 2: 4 tap Bilinear (with radius adjustment)
|
|
|
|
|
// 3: Directional blur with unsharp mask upsample.
|
2014-11-03 16:17:18 -05:00
|
|
|
// @param InCylinderDistortion 0=none..1=full in percent, can be outside of that range
|
|
|
|
|
FRCPassPostProcessUpscale(uint32 InUpscaleQuality, float InCylinderDistortion);
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
// interface FRenderingCompositePass ---------
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual void Process(FRenderingCompositePassContext& Context) override;
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void Release() override { delete this; }
|
2015-04-01 07:20:55 -04:00
|
|
|
FPooledRenderTargetDesc ComputeOutputDesc(EPassOutputId InPassOutputId) const override;
|
2014-03-14 14:13:41 -04:00
|
|
|
private:
|
2014-11-03 16:17:18 -05:00
|
|
|
// @param InCylinderDistortion 0=none..1=full in percent, must be in that range
|
|
|
|
|
template <uint32 Quality, uint32 bTesselatedQuad> static FShader* SetShader(const FRenderingCompositePassContext& Context, float InCylinderDistortion = 0.0f);
|
|
|
|
|
|
|
|
|
|
// 0: Nearest, 1: Bilinear, 2: 4 tap Bilinear (with radius adjustment), 3: Directional blur with unsharp mask upsample.
|
|
|
|
|
uint32 UpscaleQuality;
|
|
|
|
|
// 0=none..1=full, must be in that range
|
|
|
|
|
float CylinderDistortion;
|
2014-03-14 14:13:41 -04:00
|
|
|
};
|
|
|
|
|
|