2019-12-26 14:45:42 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2019-10-01 13:03:04 -04:00
|
|
|
#include "ScreenPass.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-06-03 18:07:27 -04:00
|
|
|
/** The vertex data used to filter a texture. */
|
|
|
|
|
struct FDistortionVertex
|
|
|
|
|
{
|
2021-11-18 14:37:34 -05:00
|
|
|
FVector2f Position;
|
|
|
|
|
FVector2f TexR;
|
|
|
|
|
FVector2f TexG;
|
|
|
|
|
FVector2f TexB;
|
2014-07-03 21:55:37 -04:00
|
|
|
float VignetteFactor;
|
|
|
|
|
float TimewarpFactor;
|
2014-06-03 18:07:27 -04:00
|
|
|
};
|
|
|
|
|
|
2019-10-01 13:03:04 -04:00
|
|
|
struct FHMDDistortionInputs
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2019-10-01 13:03:04 -04:00
|
|
|
// [Optional] Render to the specified output. If invalid, a new texture is created and returned.
|
|
|
|
|
FScreenPassRenderTarget OverrideOutput;
|
|
|
|
|
|
|
|
|
|
// [Required] The input scene color and view rect.
|
|
|
|
|
FScreenPassTexture SceneColor;
|
2014-03-14 14:13:41 -04:00
|
|
|
};
|
|
|
|
|
|
2019-10-01 13:03:04 -04:00
|
|
|
FScreenPassTexture AddDefaultHMDDistortionPass(FRDGBuilder& GraphBuilder, const FViewInfo& View, const FHMDDistortionInputs& Inputs);
|
|
|
|
|
|
2020-10-20 11:36:46 -04:00
|
|
|
FScreenPassTexture AddHMDDistortionPass(FRDGBuilder& GraphBuilder, const FViewInfo& View, const FHMDDistortionInputs& Inputs);
|