![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "CoreMinimal.h"#include "Stats/Stats.h"#include "HAL/IConsoleManager.h"#include "Async/ParallelFor.h"#include "RHI.h"#include "RenderResource.h"#include "ShaderParameters.h"#include "RendererInterface.h"#include "Shader.h"#include "SceneUtils.h"#include "GlobalShader.h"#include "DeferredShadingRenderer.h"#include "ScenePrivate.h"#include "SceneProxies/SkyLightSceneProxy.h"#include "DistanceFieldAtlas.h"#include "DistanceFieldLightingShared.h"#include "DistanceFieldAmbientOcclusion.h"#include "ComponentRecreateRenderStateContext.h"#include "GlobalDistanceField.h"#include "HAL/LowLevelMemStats.h"#include "ProfilingDebugging/CpuProfilerTrace.h"#include "UnrealEngine.h"#include "InstanceDataSceneProxy.h"#include "Lumen/Lumen.h"#include "Templates/Greater.h"Classes | |
| struct | FParallelUpdateRangeDFO |
| struct | FParallelUpdateRangesDFO |
| void AddModifiedBounds | ( | FDistanceFieldSceneData & | DistanceFieldSceneData, |
| FGlobalDFCacheType | CacheType, | ||
| const FBox & | Bounds | ||
| ) |
| DECLARE_GPU_STAT | ( | DistanceFields | ) |
| void LogDistanceFieldUpdate | ( | FPrimitiveSceneInfo const * | PrimitiveSceneInfo, |
| float | BoundingRadius, | ||
| bool | bIsAddOperation | ||
| ) |
| void PrepareDistanceFieldScene | ( | FRDGBuilder & | GraphBuilder, |
| FRDGExternalAccessQueue & | ExternalAccessQueue, | ||
| const FSceneRenderUpdateInputs & | SceneUpdateInputs | ||
| ) |
Prepares the distance field scene for all scene renderers.
| void ProcessDistanceFieldObjectRemoves | ( | FDistanceFieldSceneData & | DistanceFieldSceneData, |
| TArray< FSetElementId > & | DistanceFieldAssetRemoves | ||
| ) |
| void ProcessPendingHeightFieldPrimitiveAddAndRemoveOps | ( | FScene * | Scene, |
| TArray< uint32 > & | IndicesToUpdateInHeightFieldObjectBuffers | ||
| ) |
| void ProcessPrimitiveUpdate | ( | bool | bIsAddOperation, |
| FDistanceFieldSceneData & | DistanceFieldSceneData, | ||
| FPrimitiveSceneInfo * | PrimitiveSceneInfo, | ||
| TArray< FMatrix > & | InstanceLocalToWorldTmpStorage, | ||
| TArray< FDistanceFieldAssetMipId > & | DistanceFieldAssetAdds, | ||
| TArray< FSetElementId > & | DistanceFieldAssetRemoves | ||
| ) |
Gathers the information needed to represent a single object's distance field and appends it to the upload buffers.
| void UpdateGlobalHeightFieldObjectBuffers | ( | FRDGBuilder & | GraphBuilder, |
| const TArray< uint32 > & | IndicesToUpdateInHeightFieldObjectBuffers, | ||
| FDistanceFieldSceneData & | DistanceFieldSceneData | ||
| ) |
| FAutoConsoleVariableRef CVarDFParallelUpdate(TEXT("r.DistanceFields.ParallelUpdate"), GDFParallelUpdate, TEXT(""), ECVF_RenderThreadSafe) | ( | TEXT("r.DistanceFields.ParallelUpdate") | , |
| GDFParallelUpdate | , | ||
| TEXT("") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarDFReverseAtlasAllocationOrder(TEXT("r.DistanceFields.ReverseAtlasAllocationOrder"), GDFReverseAtlasAllocationOrder, TEXT(""), FConsoleVariableDelegate::CreateLambda([](IConsoleVariable *InVariable) { FGlobalComponentRecreateRenderStateContext Context; }), ECVF_RenderThreadSafe) | ( | TEXT("r.DistanceFields.ReverseAtlasAllocationOrder") | , |
| GDFReverseAtlasAllocationOrder | , | ||
| TEXT("") | , | ||
| FConsoleVariableDelegate::CreateLambda([](IConsoleVariable *InVariable) { FGlobalComponentRecreateRenderStateContext Context;}) | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarMeshDistanceFieldsMaxObjectBoundingRadius(TEXT("r.DistanceFields.MaxObjectBoundingRadius"), GMeshDistanceFieldsMaxObjectBoundingRadius, TEXT("Objects larger than this will not be included in the Mesh Distance Field scene, to improve performance."), ECVF_RenderThreadSafe) | ( | TEXT("r.DistanceFields.MaxObjectBoundingRadius") | , |
| GMeshDistanceFieldsMaxObjectBoundingRadius | , | ||
| TEXT("Objects larger than this will not be included in the Mesh Distance Field scene, to improve performance.") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| FAutoConsoleVariableRef CVarMeshSDFSurfaceBiasExpand(TEXT("r.DistanceFields.SurfaceBiasExpand"), GMeshSDFSurfaceBiasExpand, TEXT("Fraction of a Mesh SDF voxel to expand the surface during intersection. Expanding the surface improves representation quality, at the cost of over-occlusion."), FConsoleVariableDelegate::CreateLambda([](IConsoleVariable *InVariable) { FGlobalComponentRecreateRenderStateContext Context; }), ECVF_RenderThreadSafe) | ( | TEXT("r.DistanceFields.SurfaceBiasExpand") | , |
| GMeshSDFSurfaceBiasExpand | , | ||
| TEXT("Fraction of a Mesh SDF voxel to expand the surface during intersection. Expanding the surface improves representation quality, at the cost of over-occlusion.") | , | ||
| FConsoleVariableDelegate::CreateLambda([](IConsoleVariable *InVariable) { FGlobalComponentRecreateRenderStateContext Context;}) | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| int32 GDFParallelUpdate = 0 |
| int32 GDFPreviousReverseAtlasAllocationOrder = 0 |
| int32 GDFReverseAtlasAllocationOrder = 0 |
|
extern |
| float GMeshDistanceFieldsMaxObjectBoundingRadius = 100000 |
| float GMeshSDFSurfaceBiasExpand = .25f |
| const uint32 UpdateObjectsGroupSize = 64 |