![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "DistanceFieldAmbientOcclusion.h"#include "DataDrivenShaderPlatformInfo.h"#include "DeferredShadingRenderer.h"#include "PostProcess/PostProcessing.h"#include "PostProcess/SceneFilterRendering.h"#include "DistanceFieldLightingShared.h"#include "ScreenRendering.h"#include "DistanceFieldLightingPost.h"#include "OneColorShader.h"#include "GlobalDistanceField.h"#include "FXSystem.h"#include "RendererModule.h"#include "PipelineStateCache.h"#include "VisualizeTexture.h"#include "RayTracing/RaytracingOptions.h"#include "Lumen/Lumen.h"#include "MegaLights/MegaLights.h"#include "ScenePrivate.h"#include "SceneProxies/SkyLightSceneProxy.h"#include "Substrate/Substrate.h"Classes | |
| class | FComputeDistanceFieldNormalPS |
| class | FComputeDistanceFieldNormalCS |
| void AllocateTileIntersectionBuffers | ( | FRDGBuilder & | GraphBuilder, |
| FIntPoint | TileListGroupSize, | ||
| uint32 | MaxSceneObjects, | ||
| bool | bAllow16BitIndices, | ||
| FRDGBufferRef & | OutObjectTilesIndirectArguments, | ||
| FTileIntersectionParameters & | OutParameters | ||
| ) |
| void ComputeDistanceFieldNormal | ( | FRDGBuilder & | GraphBuilder, |
| const FViewInfo & | View, | ||
| const FSceneTextures & | SceneTextures, | ||
| FRDGTextureRef | DistanceFieldNormal, | ||
| const FDistanceFieldAOParameters & | Parameters | ||
| ) |
| FAutoConsoleVariableRef CVarDistanceFieldAO | ( | TEXT("r.DistanceFieldAO") | , |
| GDistanceFieldAO | , | ||
| TEXT("Whether the distance field AO feature is allowed, which is used to implement shadows of Movable sky lights from static meshes.") | , | ||
| ECVF_Scalability| | ECVF_RenderThreadSafe | ||
| ) |
| FAutoConsoleVariableRef CVarDistanceFieldAOApplyToStaticIndirect | ( | TEXT("r.AOApplyToStaticIndirect") | , |
| GDistanceFieldAOApplyToStaticIndirect | , | ||
| TEXT("Whether to apply DFAO as indirect shadowing even to static indirect sources (lightmaps + stationary skylight + reflection captures)") | , | ||
| ECVF_Scalability| | ECVF_RenderThreadSafe | ||
| ) |
| FAutoConsoleVariableRef CVarDistanceFieldAOMultiView | ( | TEXT("r.DistanceFieldAO.MultiView") | , |
| GDistanceFieldAOMultiView | , | ||
| TEXT("Whether the distance field AO feature is allowed when rendering multiple views.") | , | ||
| ECVF_Scalability| | ECVF_RenderThreadSafe | ||
| ) |
| FAutoConsoleVariableRef CVarDistanceFieldAOQuality | ( | TEXT("r.AOQuality") | , |
| GDistanceFieldAOQuality | , | ||
| TEXT(" 0:off, 1:medium, 2:high (default)") | , | ||
| ECVF_Scalability| | ECVF_RenderThreadSafe | ||
| ) |
| FAutoConsoleVariableRef CVarDistanceFieldAOSpecularOcclusionMode | ( | TEXT("r.AOSpecularOcclusionMode") | , |
| GDistanceFieldAOSpecularOcclusionMode | , | ||
| TEXT("1: (default) Intersect the reflection cone with the unoccluded cone produced by DFAO. This gives more accurate occlusion than 0, but can bring out DFAO sampling artifacts.\n") | , | ||
| ECVF_Scalability| | ECVF_RenderThreadSafe | ||
| ) |
| FAutoConsoleVariableRef CVarMobileDistanceFieldAO | ( | TEXT("r.Mobile.DistanceFieldAO") | , |
| GMobileDistanceFieldAO | , | ||
| TEXT("Whether the distance field AO feature is allowed for Mobile Platforms, which is used to implement shadows of Movable sky lights from static meshes.") | , | ||
| ECVF_ReadOnly| | ECVF_RenderThreadSafe | ||
| ) |
| DEFINE_LOG_CATEGORY | ( | LogDistanceField | ) |
| void GenerateBestSpacedVectors | ( | ) |
| void GetSpacedVectors | ( | uint32 | FrameNumber, |
| TArray< FVector, TInlineAllocator< 9 > > & | OutVectors | ||
| ) |
| FVector GetUnitPosition2 | ( | FRandomStream & | RandomStream | ) |
Generates a pseudo-random position inside the unit sphere, uniformly distributed over the volume of the sphere.
| FVector GetUnitVector2 | ( | FRandomStream & | RandomStream | ) |
Generates a pseudo-random unit vector, uniformly distributed over all directions.
| IMPLEMENT_GLOBAL_SHADER | ( | FComputeDistanceFieldNormalCS | , |
| "/Engine/Private/DistanceFieldScreenGridLighting.usf" | , | ||
| "ComputeDistanceFieldNormalCS" | , | ||
| SF_Compute | |||
| ) |
| IMPLEMENT_GLOBAL_SHADER | ( | FComputeDistanceFieldNormalPS | , |
| "/Engine/Private/DistanceFieldScreenGridLighting.usf" | , | ||
| "ComputeDistanceFieldNormalPS" | , | ||
| SF_Pixel | |||
| ) |
| void ListDistanceFieldLightingMemory | ( | const FScene * | Scene, |
| FSceneRenderer & | SceneRenderer | ||
| ) |
| bool ShouldCompileDFNormalShaders | ( | EShaderPlatform | ShaderPlatform | ) |
| bool ShouldDoReflectionEnvironment | ( | const FScene * | Scene, |
| const FSceneViewFamily & | ViewFamily | ||
| ) |
| bool ShouldPrepareDistanceFieldScene | ( | const FSceneRenderUpdateInputs & | SceneUpdateInputs | ) |
| bool ShouldPrepareForDistanceFieldAO | ( | const FScene * | Scene, |
| const FSceneViewFamily & | ViewFamily, | ||
| bool | bAnyViewHasGIMethodSupportingDFAO | ||
| ) |
| bool ShouldPrepareForDistanceFieldAO | ( | const FSceneRenderUpdateInputs & | SceneUpdateInputs | ) |
| bool ShouldPrepareGlobalDistanceField | ( | const FSceneRenderer * | Renderer | ) |
| bool ShouldRenderDeferredDynamicSkyLight | ( | const FScene * | Scene, |
| const FSceneViewFamily & | ViewFamily | ||
| ) |
| bool ShouldRenderDistanceFieldAO | ( | TConstArrayView< FViewInfo > | Views, |
| const FEngineShowFlags & | EngineShowFlags | ||
| ) |
| bool ShouldRenderDistanceFieldLighting | ( | const FDistanceFieldSceneData & | SceneData, |
| TConstArrayView< FViewInfo > | Views | ||
| ) |
| bool SupportsDistanceFieldAO | ( | ERHIFeatureLevel::Type | FeatureLevel, |
| EShaderPlatform | ShaderPlatform | ||
| ) |
| void TileIntersectionModifyCompilationEnvironment | ( | EShaderPlatform | Platform, |
| FShaderCompilerEnvironment & | OutEnvironment | ||
| ) |
| bool UseAOObjectDistanceField | ( | ) |
| bool UseDistanceFieldAO | ( | ) |
| FAutoConsoleVariableRef CVarAOComputeShaderNormalCalculation(TEXT("r.AOComputeShaderNormalCalculation"), GAOComputeShaderNormalCalculation, TEXT("Whether to use the compute shader version of the distance field normal computation."), ECVF_RenderThreadSafe) | ( | TEXT("r.AOComputeShaderNormalCalculation") | , |
| GAOComputeShaderNormalCalculation | , | ||
| TEXT("Whether to use the compute shader version of the distance field normal computation.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOGlobalDistanceFieldDetailedCheck(TEXT("r.AOGlobalDistanceField.DetailedNecessityCheck"), GAOGlobalDistanceFieldDetailedNecessityCheck, TEXT("Whether to perform detailed necessity check in FSceneRenderer::ShouldPrepareGlobalDistanceField()."), ECVF_RenderThreadSafe) | ( | TEXT("r.AOGlobalDistanceField.DetailedNecessityCheck") | , |
| GAOGlobalDistanceFieldDetailedNecessityCheck | , | ||
| TEXT("Whether to perform detailed necessity check in FSceneRenderer::ShouldPrepareGlobalDistanceField().") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOJitterConeDirections(TEXT("r.AOJitterConeDirections"), GAOJitterConeDirections, TEXT(""), ECVF_RenderThreadSafe) | ( | TEXT("r.AOJitterConeDirections") | , |
| GAOJitterConeDirections | , | ||
| TEXT("") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOMaxViewDistance(TEXT("r.AOMaxViewDistance"), GAOMaxViewDistance, TEXT("The maximum distance that AO will be computed at."), ECVF_RenderThreadSafe) | ( | TEXT("r.AOMaxViewDistance") | , |
| GAOMaxViewDistance | , | ||
| TEXT("The maximum distance that AO will be computed at.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOObjectDistanceField(TEXT("r.AOObjectDistanceField"), GAOObjectDistanceField, TEXT("Only global distance field will be used when this option is disabled.\n"), ECVF_RenderThreadSafe) | ( | TEXT("r.AOObjectDistanceField") | , |
| GAOObjectDistanceField | , | ||
| TEXT("Only global distance field will be used when this option is disabled.\n") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOOverwriteSceneColor(TEXT("r.AOOverwriteSceneColor"), GAOOverwriteSceneColor, TEXT(""), ECVF_RenderThreadSafe) | ( | TEXT("r.AOOverwriteSceneColor") | , |
| GAOOverwriteSceneColor | , | ||
| TEXT("") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOSampleSet(TEXT("r.AOSampleSet"), GAOSampleSet, TEXT("0 = Original set, 1 = Relaxed set"), ECVF_RenderThreadSafe) | ( | TEXT("r.AOSampleSet") | , |
| GAOSampleSet | , | ||
| TEXT("0 = Original set, 1 = Relaxed set") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarAOStepExponentScale(TEXT("r.AOStepExponentScale"), GAOStepExponentScale, TEXT("Exponent used to distribute AO samples along a cone direction."), ECVF_RenderThreadSafe) | ( | TEXT("r.AOStepExponentScale") | , |
| GAOStepExponentScale | , | ||
| TEXT("Exponent used to distribute AO samples along a cone direction.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| int32 GAOComputeShaderNormalCalculation = 0 |
| float GAOConeHalfAngle = FMath::Acos(1 - 1.0f / (float)UE_ARRAY_COUNT(SpacedVectors9)) |
| int32 GAOGlobalDistanceFieldDetailedNecessityCheck = 1 |
| int32 GAOJitterConeDirections = 0 |
| float GAOMaxViewDistance = 20000 |
| uint32 GAONumConeSteps = 10 |
| int32 GAOObjectDistanceField = 1 |
| int32 GAOOverwriteSceneColor = 0 |
| int32 GAOSampleSet = 1 |
| float GAOStepExponentScale = .5f |
|
extern |
| int32 GDistanceFieldAO = 1 |
| int32 GDistanceFieldAOApplyToStaticIndirect = 0 |
| int32 GDistanceFieldAOMultiView = 1 |
| int32 GDistanceFieldAOQuality = 2 |
| int32 GDistanceFieldAOSpecularOcclusionMode = 1 |
| int32 GDistanceFieldAOTileSizeX = 16 |
Tile sized used for most AO compute shaders.
| int32 GDistanceFieldAOTileSizeY = 16 |
| int32 GMobileDistanceFieldAO = 0 |
| FAutoConsoleCommandWithWorld ListMemoryConsoleCommand(TEXT("r.AOListMemory"), TEXT(""), FConsoleCommandWithWorldDelegate::CreateStatic(OnListMemory)) | ( | TEXT("r.AOListMemory") | , |
| TEXT("") | , | ||
| FConsoleCommandWithWorldDelegate::CreateStatic(OnListMemory) | |||
| ) |
| FAutoConsoleCommandWithWorld ListMeshDistanceFieldsMemoryConsoleCommand(TEXT("r.AOListMeshDistanceFields"), TEXT(""), FConsoleCommandWithWorldDelegate::CreateStatic(OnListMeshDistanceFields)) | ( | TEXT("r.AOListMeshDistanceFields") | , |
| TEXT("") | , | ||
| FConsoleCommandWithWorldDelegate::CreateStatic(OnListMeshDistanceFields) | |||
| ) |
| const FVector RelaxedSpacedVectors9[] |
| const FVector SpacedVectors9[] |