Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Private/PostProcess/PostProcessing.h
tiago costa 46f76117da Don't include emissive and translucent materials when calculating illuminance for auto exposure.
- Extract emissive, diffuse and subsurface color right after base pass before lighting is calculated.
- Calculate illuminance before translucent pass.

#rb brian.karis
#preflight skip

[CL 22948892 by tiago costa in ue5-main branch]
2022-11-03 06:03:43 -04:00

80 lines
2.7 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);
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);