Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.h
guillaume abadie 2b9830335a Implements TSR's ComputeMoireLuma from scene color beforedistortion translucency
#rb none
#preflight 6373d73bee4d25f90a428c10

[CL 23148009 by guillaume abadie in ue5-main branch]
2022-11-15 19:44:07 -05:00

81 lines
2.8 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ScreenPass.h"
#include "TranslucentRendering.h"
#include "SystemTextures.h"
#include "ScenePrivate.h"
#include "DeferredShadingRenderer.h"
class FSceneTextureParameters;
class FVirtualShadowMapArray;
namespace Nanite
{
struct FRasterResults;
}
// Returns whether the full post process pipeline is enabled. Otherwise, the minimal set of operations are performed.
bool IsPostProcessingEnabled(const FViewInfo& View);
// Returns whether the post process pipeline supports using compute passes.
bool IsPostProcessingWithComputeEnabled(ERHIFeatureLevel::Type FeatureLevel);
// Returns whether the post process pipeline supports propagating the alpha channel.
bool IsPostProcessingWithAlphaChannelSupported();
using FPostProcessVS = FScreenPassVS;
struct FPostProcessingInputs
{
TRDGUniformBufferRef<FSceneTextureUniformParameters> SceneTextures = nullptr;
FRDGTextureRef ViewFamilyTexture = nullptr;
FRDGTextureRef CustomDepthTexture = nullptr;
FRDGTextureRef ExposureIlluminance = nullptr;
FTranslucencyViewResourcesMap TranslucencyViewResourcesMap;
void Validate() const
{
check(SceneTextures);
check(ViewFamilyTexture);
check(TranslucencyViewResourcesMap.IsValid());
}
};
void AddPostProcessingPasses(
FRDGBuilder& GraphBuilder,
const FViewInfo& View, int32 ViewIndex,
bool bAnyLumenActive,
EReflectionsMethod ReflectionsMethod,
const FPostProcessingInputs& Inputs,
const Nanite::FRasterResults* NaniteRasterResults,
FInstanceCullingManager& InstanceCullingManager,
FVirtualShadowMapArray* VirtualShadowMapArray,
struct FLumenSceneFrameTemporaries& LumenFrameTemporaries,
const FSceneWithoutWaterTextures& SceneWithoutWaterTextures,
FScreenPassTexture TSRMoireInput);
void AddDebugViewPostProcessingPasses(FRDGBuilder& GraphBuilder, const FViewInfo& View, const FPostProcessingInputs& Inputs, const Nanite::FRasterResults* NaniteRasterResults);
void AddVisualizeCalibrationMaterialPostProcessingPasses(FRDGBuilder& GraphBuilder, const FViewInfo& View, const FPostProcessingInputs& Inputs, const UMaterialInterface* InMaterialInterface);
struct FMobilePostProcessingInputs
{
TRDGUniformBufferRef<FMobileSceneTextureUniformParameters> SceneTextures = nullptr;
FRDGTextureRef ViewFamilyTexture = nullptr;
bool bRequiresMultiPass = false;
void Validate() const
{
check(ViewFamilyTexture);
check(SceneTextures);
}
};
void AddMobilePostProcessingPasses(FRDGBuilder& GraphBuilder, FScene* Scene, const FViewInfo& View, const FMobilePostProcessingInputs& Inputs, FInstanceCullingManager& InstanceCullingManager);
void AddBasicPostProcessPasses(FRDGBuilder& GraphBuilder, const FViewInfo& View);
FRDGTextureRef AddProcessPlanarReflectionPass(FRDGBuilder& GraphBuilder, const FViewInfo& View, FRDGTextureRef SceneColorTexture);