Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessUpscale.h
Chris Babcock 09d6aec75a Copying //UE4/Dev-Mobile to //UE4/Dev-Main (Source: //UE4/Dev-Mobile @ 3281679)
#rb none
#lockdown Nick.Penwarden

==========================
MAJOR FEATURES + CHANGES
==========================

Change 3228537 on 2016/12/09 by Dmitriy.Dyomin

	Fix for MGD v4.3.0

Change 3228800 on 2016/12/09 by Allan.Bentham

	Update outstanding on-load reflection captures when mobile preview is active.
	#jira UE-39487

Change 3239410 on 2016/12/19 by Dmitriy.Dyomin

	Fixed: Exponential Height Fog renders incorrectly after Set World Origin Location
	#jira UE-39616

Change 3240878 on 2016/12/20 by Jack.Porter

	Mobile Support for r.ScreenPercentage
	#jira UE-39620

Change 3241506 on 2016/12/20 by Jack.Porter

	Changed constructor field initialization order to fix Mac warning

Change 3241564 on 2016/12/21 by Jack.Porter

	Changed another constructor field initialization order to fix Mac warning

Change 3243237 on 2016/12/22 by Jack.Porter

	Added CustomDepth/CustomStencil and Lighting Channels to Landscape Actor
	#jira UE-28371
	#jira UE-36721

Change 3244540 on 2017/01/02 by Jack.Porter

	Hide Landscape filter for foliage fill tool, as that tool doesn't operate on Landscape.
	#jira UE-4087

Change 3245833 on 2017/01/03 by Jack.Porter

	Allow vsync to be disabled on Android OpenGL ES.

	PR #3071: OpenGLES vsync fix (Contributed by haowang1013)

Change 3256593 on 2017/01/13 by Jack.Porter

	Fix merge/compile error in PostProcessUpscale.cpp

Change 3269195 on 2017/01/23 by Dmitriy.Dyomin

	Fixed: Static-like noise on IOS
	#jira UE-41018

Change 3271148 on 2017/01/25 by Jack.Porter

	Fixed issue where HTML5 video in Web Browser widget would only output sound on Android
	#jira UE-38346

Change 3273161 on 2017/01/26 by Jack.Porter

	Fix for rare random web browser crash on iOS due to threading issue
	#jira UE-40910

Change 3281310 on 2017/02/01 by Chris.Babcock

	Correct line endings

[CL 3281684 by Chris Babcock in Main branch]
2017-02-01 15:23:46 -05:00

91 lines
2.7 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
PostProcessUpscale.h: Post processing Upscale implementation.
=============================================================================*/
#pragma once
#include "CoreMinimal.h"
#include "RendererInterface.h"
#include "PostProcess/RenderingCompositionGraph.h"
class FViewInfo;
// derives from TRenderingCompositePassBase<InputCount, OutputCount>
// ePId_Input0: SceneColor (bilinear)
// ePId_Input1: SceneColor (point)
class FRCPassPostProcessUpscale : public TRenderingCompositePassBase<2, 1>
{
public:
// Panini configuration
// NOTE: more details in Common.usf
struct PaniniParams
{
// 0=none..1=full, must be >= 0
float D;
// Panini hard vertical compression lerp (0=no vertical compresion, 1=hard compression)
float S;
// Panini screen fit factor (lerp between vertical and horizontal)
float ScreenFit;
// constructor off
PaniniParams()
: D(0.0f)
, S(0.0f)
, ScreenFit(1.0f)
{}
PaniniParams(const FViewInfo& View);
bool IsEnabled() const
{
return D > 0.01f;
}
static const PaniniParams Default;
};
// constructor
// @param InUpscaleQuality - value denoting Upscale method to use:
// 0: Nearest
// 1: Bilinear
// 2: 4 tap Bilinear (with radius adjustment)
// 3: Directional blur with unsharp mask upsample.
// @param InPaniniConfig - the panini configuration parameter
FRCPassPostProcessUpscale(const FViewInfo& InView, uint32 InUpscaleQuality, const PaniniParams& InPaniniConfig = PaniniParams::Default);
// interface FRenderingCompositePass ---------
virtual void Process(FRenderingCompositePassContext& Context) override;
virtual void Release() override { delete this; }
FPooledRenderTargetDesc ComputeOutputDesc(EPassOutputId InPassOutputId) const override;
private:
// @param InCylinderDistortion 0=none..1=full in percent, must be in that range
template <uint32 Quality, uint32 bTesselatedQuad> static FShader* SetShader(const FRenderingCompositePassContext& Context, const PaniniParams& PaniniConfig);
// 0: Nearest, 1: Bilinear, 2: 4 tap Bilinear (with radius adjustment), 3: Directional blur with unsharp mask upsample.
uint32 UpscaleQuality;
// Panini projection's parameter
PaniniParams PaniniConfig;
// Extent of upscaled output
FIntPoint OutputExtent;
};
// Simple version used for ES2 forcing Bilinear and overriding the output extent
class FRCPassPostProcessUpscaleES2 : public FRCPassPostProcessUpscale
{
public:
FRCPassPostProcessUpscaleES2(const FViewInfo& InView);
FPooledRenderTargetDesc ComputeOutputDesc(EPassOutputId InPassOutputId) const override;
private:
const FViewInfo& View;
};