Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.h
guillaume abadie eadb45ef37 Replaces r.PostProcessAAQuality with r.FXAA.Quality & r.TemporalAA.Quality
Now only r.AntiAliasingMethod prevails to selects the anti-aliasing method explicitly for the deferred shading renderer. Each AA technic have it's own cvars to control their quality independently

FXAA now have its own r.FXAA.Quality. The FXAA shader permutations where mis configured with r.PostProcessAAQuality=1 & 2 both mapping to the FXAA_PC_CONSOLE=1 that is now r.FXAA.Quality=0. Instead r.FXAA.Quality now offer more mid-quality settings for FXAA_PC=1 with r.FXAA.Quality=1 & 2 & 3. Backward comaptible migration is as followed:
- r.AntiAliasingMethod=1 r.PostProcessAAQuality=0 -> r.FXAA.Quality=0
- r.AntiAliasingMethod=1 r.PostProcessAAQuality=1 -> r.FXAA.Quality=0
- r.AntiAliasingMethod=1 r.PostProcessAAQuality=2 -> r.FXAA.Quality=0
- r.AntiAliasingMethod=1 r.PostProcessAAQuality=3 -> r.FXAA.Quality=3 but with some neighborhood search setting changed in FXAAShader.usf
- r.AntiAliasingMethod=1 r.PostProcessAAQuality=4 -> r.FXAA.Quality=4
- r.AntiAliasingMethod=1 r.PostProcessAAQuality=5 -> r.FXAA.Quality=5

TAA now have its own r.TemporalAA.Quality. Backward compatible migration is as followed:
- r.AntiAliasingMethod=2 r.PostProcessAAQuality=0 -> r.AntiAliasingMethod=0
- r.AntiAliasingMethod=2 r.PostProcessAAQuality=1 -> r.AntiAliasingMethod=1 r.FXAA.Quality=0
- r.AntiAliasingMethod=2 r.PostProcessAAQuality=2 -> r.AntiAliasingMethod=1 r.FXAA.Quality=0
- r.AntiAliasingMethod=2 r.PostProcessAAQuality=3 r.TemporalAAUpsampleFiltered=0 -> r.TemporalAA.Quality=0
- r.AntiAliasingMethod=2 r.PostProcessAAQuality=3 r.TemporalAAUpsampleFiltered=1 -> r.TemporalAA.Quality=1
- r.AntiAliasingMethod=2 r.PostProcessAAQuality=4 -> r.TemporalAA.Quality=2

MSAA r.AntiAliasingMethod=3 & TSR r.AntiAliasingMethod=4 remains unchanged.

sg.AntiAliasingQuality now maps to different r.TemporalAA.Quality or r.FXAA.Quality

Automated tests on base CL: https://horde.devtools.epicgames.com/job/60d5b8410123b700014f9db5
Automated tests on change CL: https://horde.devtools.epicgames.com/job/60d47cde57b302000114bebf

#rb none
[FYI] jack.porter, wei.liu
#lockdown michal.valient

#ROBOMERGE-SOURCE: CL 16823623 via CL 16823646
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16823657 by guillaume abadie in ue5-release-engine-test branch]
2021-07-12 07:13:12 -04:00

72 lines
2.4 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;
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;
const FSeparateTranslucencyTextures* SeparateTranslucencyTextures = nullptr;
void Validate() const
{
check(SceneTextures);
check(ViewFamilyTexture);
check(CustomDepthTexture);
check(SeparateTranslucencyTextures);
}
};
void AddPostProcessingPasses(FRDGBuilder& GraphBuilder, const FViewInfo& View, const FPostProcessingInputs& Inputs, const Nanite::FRasterResults* NaniteRasterResults, FInstanceCullingManager& InstanceCullingManager);
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);