Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.h
daniel wright 765fd44bc6 Lumen Visualization rendering moved to AddPostProcessingPasses to fix composition issues with transparency, TAA and editor primitives. Visualizations refactored to work in post processing pipeline.
* Visualize Lumen Scene and Surface Cache moved to after TAAU, but before tonemapper
* Visualize Lumen Overview moved after tonemapper and editor primitive compositing
* Handling removing of TAA jitter, manual upscale, manual tonemapping
* Visualize HWRT refactored to no longer rely on SceneDepth, which is not available after TAAU

Changed default r.Lumen.Visualize.HardwareRayTracing.Retrace.HitLighting to 0 to better match how the features use it

#preflight 61f8af95114ec25fe0cb8dd5
#rb Krzysztof.Narkowicz

#ROBOMERGE-AUTHOR: daniel.wright
#ROBOMERGE-SOURCE: CL 18810990 in //UE5/Release-5.0/... via CL 18811004 via CL 18822705
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18823638 by daniel wright in ue5-main branch]
2022-02-02 05:55:10 -05:00

80 lines
2.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ScreenPass.h"
#include "TranslucentRendering.h"
#include "SystemTextures.h"
#include "ScenePrivate.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;
FTranslucencyViewResourcesMap TranslucencyViewResourcesMap;
void Validate() const
{
check(SceneTextures);
check(ViewFamilyTexture);
check(TranslucencyViewResourcesMap.IsValid());
}
};
void AddPostProcessingPasses(
FRDGBuilder& GraphBuilder,
const FViewInfo& View,
bool bAnyLumenActive,
const FPostProcessingInputs& Inputs,
const Nanite::FRasterResults* NaniteRasterResults,
FInstanceCullingManager& InstanceCullingManager,
FVirtualShadowMapArray* VirtualShadowMapArray,
struct FLumenSceneFrameTemporaries& LumenFrameTemporaries);
void AddDebugViewPostProcessingPasses(FRDGBuilder& GraphBuilder, const FViewInfo& View, const FPostProcessingInputs& Inputs, const Nanite::FRasterResults* NaniteRasterResults);
#if !(UE_BUILD_SHIPPING)
void AddVisualizeCalibrationMaterialPostProcessingPasses(FRDGBuilder& GraphBuilder, const FViewInfo& View, const FPostProcessingInputs& Inputs, const UMaterialInterface* InMaterialInterface);
#endif
struct FMobilePostProcessingInputs
{
TRDGUniformBufferRef<FMobileSceneTextureUniformParameters> SceneTextures = nullptr;
FRDGTextureRef ViewFamilyTexture = nullptr;
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);