![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "DistanceFieldLightingPost.h"#include "PostProcess/PostProcessing.h"#include "PostProcess/SceneFilterRendering.h"#include "DistanceFieldLightingShared.h"#include "DistanceFieldAmbientOcclusion.h"#include "CompositionLighting/PostProcessAmbientOcclusion.h"#include "PipelineStateCache.h"#include "ScenePrivate.h"#include "SceneProxies/SkyLightSceneProxy.h"#include "DataDrivenShaderPlatformInfo.h"Classes | |
| class | FUpdateHistoryDepthRejectionPS |
| class | FFilterHistoryPS |
| class | FGeometryAwareUpsamplePS |
| class | FDistanceFieldAOUpsamplePS |
| void AllocateOrReuseAORenderTarget | ( | FRDGBuilder & | GraphBuilder, |
| const FViewInfo & | View, | ||
| FRDGTextureRef & | Texture, | ||
| const TCHAR * | Name, | ||
| EPixelFormat | Format, | ||
| ETextureCreateFlags | Flags | ||
| ) |
| void GeometryAwareUpsample | ( | FRDGBuilder & | GraphBuilder, |
| const FViewInfo & | View, | ||
| FRDGTextureRef | DistanceFieldAOBentNormal, | ||
| FRDGTextureRef | DistanceFieldNormal, | ||
| FRDGTextureRef | BentNormalInterpolation, | ||
| const FDistanceFieldAOParameters & | Parameters | ||
| ) |
| IMPLEMENT_GLOBAL_SHADER | ( | FDistanceFieldAOUpsamplePS | , |
| "/Engine/Private/DistanceFieldLightingPost.usf" | , | ||
| "AOUpsamplePS" | , | ||
| SF_Pixel | |||
| ) |
| IMPLEMENT_GLOBAL_SHADER | ( | FFilterHistoryPS | , |
| "/Engine/Private/DistanceFieldLightingPost.usf" | , | ||
| "FilterHistoryPS" | , | ||
| SF_Pixel | |||
| ) |
| IMPLEMENT_GLOBAL_SHADER | ( | FUpdateHistoryDepthRejectionPS | , |
| "/Engine/Private/DistanceFieldLightingPost.usf" | , | ||
| "UpdateHistoryDepthRejectionPS" | , | ||
| SF_Pixel | |||
| ) |
| IMPLEMENT_SHADER_TYPE | ( | FGeometryAwareUpsamplePS | , |
| TEXT("/Engine/Private/DistanceFieldLightingPost.usf") | , | ||
| TEXT("GeometryAwareUpsamplePS") | , | ||
| SF_Pixel | |||
| ) |
| FGeometryAwareUpsampleParameters SetupGeometryAwareUpsampleParameters | ( | const FViewInfo & | View, |
| FRDGTextureRef | DistanceFieldNormal, | ||
| FRDGTextureRef | DistanceFieldAOBentNormal | ||
| ) |
| bool ShouldCompileDFLightingPostShaders | ( | EShaderPlatform | ShaderPlatform | ) |
| void UpdateHistory | ( | FRDGBuilder & | GraphBuilder, |
| const FViewInfo & | View, | ||
| const TCHAR * | BentNormalHistoryRTName, | ||
| const FSceneTextures & | SceneTextures, | ||
| FRDGTextureRef | VelocityTexture, | ||
| FRDGTextureRef | DistanceFieldNormal, | ||
| FRDGTextureRef | BentNormalInterpolation, | ||
| FIntRect * | DistanceFieldAOHistoryViewRect, | ||
| TRefCountPtr< IPooledRenderTarget > * | BentNormalHistoryState, | ||
| FRDGTextureRef & | BentNormalHistoryOutput, | ||
| const FDistanceFieldAOParameters & | Parameters | ||
| ) |
| DistanceFieldAOHistoryViewRect | Contains last frame's history, if non-NULL. This will be updated with the new frame's history. |
| BentNormalHistoryOutput | Output of Temporal Reprojection for the next step in the pipeline. |
| void UpsampleBentNormalAO | ( | FRDGBuilder & | GraphBuilder, |
| const FViewInfo & | View, | ||
| const FSceneTextures & | SceneTextures, | ||
| FRDGTextureRef | SceneColorTexture, | ||
| FRDGTextureRef | DistanceFieldAOBentNormal, | ||
| bool | bModulateSceneColor, | ||
| bool | bModulateToScreenSpaceAO | ||
| ) |
| bool UseAOHistoryStabilityPass | ( | ) |
| FAutoConsoleVariableRef CVarAOClearHistory(TEXT("r.AOClearHistory"), GAOClearHistory, TEXT(""), ECVF_RenderThreadSafe) | ( | TEXT("r.AOClearHistory") | , |
| GAOClearHistory | , | ||
| TEXT("") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOHistoryDistanceThreshold(TEXT("r.AOHistoryDistanceThreshold"), GAOHistoryDistanceThreshold, TEXT("World space distance threshold needed to discard last frame's DFAO results. Lower values reduce ghosting from characters when near a wall but increase flickering artifacts."), ECVF_RenderThreadSafe) | ( | TEXT("r.AOHistoryDistanceThreshold") | , |
| GAOHistoryDistanceThreshold | , | ||
| TEXT("World space distance threshold needed to discard last frame's DFAO results. Lower values reduce ghosting from characters when near a wall but increase flickering artifacts.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOHistoryStabilityPass(TEXT("r.AOHistoryStabilityPass"), GAOHistoryStabilityPass, TEXT("Whether to gather stable results to fill in holes in the temporal reprojection. Adds some GPU cost but improves temporal stability with foliage."), ECVF_RenderThreadSafe) | ( | TEXT("r.AOHistoryStabilityPass") | , |
| GAOHistoryStabilityPass | , | ||
| TEXT("Whether to gather stable results to fill in holes in the temporal reprojection. Adds some GPU cost but improves temporal stability with foliage.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOHistoryWeight(TEXT("r.AOHistoryWeight"), GAOHistoryWeight, TEXT("Amount of last frame's AO to lerp into the final result. Higher values increase stability, lower values have less streaking under occluder movement."), ECVF_RenderThreadSafe) | ( | TEXT("r.AOHistoryWeight") | , |
| GAOHistoryWeight | , | ||
| TEXT("Amount of last frame's AO to lerp into the final result. Higher values increase stability, lower values have less streaking under occluder movement.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOUseHistory(TEXT("r.AOUseHistory"), GAOUseHistory, TEXT("Whether to apply a temporal filter to the distance field AO, which reduces flickering but also adds trails when occluders are moving."), ECVF_RenderThreadSafe) | ( | TEXT("r.AOUseHistory") | , |
| GAOUseHistory | , | ||
| TEXT("Whether to apply a temporal filter to the distance field AO, which reduces flickering but also adds trails when occluders are moving.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOViewFadeDistanceScale(TEXT("r.AOViewFadeDistanceScale"), GAOViewFadeDistanceScale, TEXT("Distance over which AO will fade out as it approaches r.AOMaxViewDistance, as a fraction of r.AOMaxViewDistance."), ECVF_RenderThreadSafe) | ( | TEXT("r.AOViewFadeDistanceScale") | , |
| GAOViewFadeDistanceScale | , | ||
| TEXT("Distance over which AO will fade out as it approaches r.AOMaxViewDistance, as a fraction of r.AOMaxViewDistance.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| int32 GAOClearHistory = 0 |
| float GAOHistoryDistanceThreshold = 30 |
| int32 GAOHistoryStabilityPass = 1 |
| float GAOHistoryWeight = .85f |
| int32 GAOUseHistory = 1 |
| float GAOViewFadeDistanceScale = .7f |