UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SceneRendering.h File Reference
#include "SceneRendererInterface.h"
#include "CoreMinimal.h"
#include "Containers/IndirectArray.h"
#include "Containers/ArrayView.h"
#include "Stats/Stats.h"
#include "RHI.h"
#include "RenderResource.h"
#include "UniformBuffer.h"
#include "GlobalDistanceField.h"
#include "GlobalDistanceFieldParameters.h"
#include "SceneView.h"
#include "RendererInterface.h"
#include "BatchedElements.h"
#include "MeshBatch.h"
#include "ScenePrivateBase.h"
#include "SceneVisibility.h"
#include "PrimitiveSceneInfo.h"
#include "PrimitiveViewRelevance.h"
#include "LightShaftRendering.h"
#include "StaticBoundShaderState.h"
#include "Templates/UniquePtr.h"
#include "MeshDrawCommands.h"
#include "MeshPassProcessor.h"
#include "RayTracingMeshDrawCommands.h"
#include "ShaderPrintParameters.h"
#include "PostProcess/PostProcessAmbientOcclusionMobile.h"
#include "VirtualShadowMaps/VirtualShadowMapArray.h"
#include "VirtualShadowMaps/VirtualShadowMapProjection.h"
#include "Lumen/LumenTranslucencyVolumeLighting.h"
#include "MegaLights/MegaLights.h"
#include "HairStrands/HairStrandsData.h"
#include "Substrate/Substrate.h"
#include "TemporalUpscaler.h"
#include "GPUScene.h"
#include "RenderCore.h"
#include "SceneTextures.h"
#include "TranslucencyPass.h"
#include "SceneTexturesConfig.h"
#include "SceneUniformBuffer.h"
#include "TextureFallbacks.h"
#include "SceneInterface.h"
#include "Async/Mutex.h"
#include "LocalFogVolumeRendering.h"
#include "Nanite/NaniteShared.h"
#include "LightFunctionAtlas.h"
#include "SceneExtensions.h"
#include "PostProcess/LensDistortion.h"
#include "DepthRendering.h"

Go to the source code of this file.

Classes

struct  FPersistentViewId
 
struct  FSceneCaptureLogUtils
 
class  FMobileCSMVisibilityInfo
 
class  FMobileCSMSubjectPrimitives
 
class  FVisibleLightViewInfo
 
class  FVisibleLightInfo
 
struct  FTranslucenyPrimCount
 
struct  FOcclusionPrimitive
 
class  FFrameBasedOcclusionQueryPool
 
class  FOcclusionQueryBatcher
 
class  FHZBOcclusionTester
 
class  FVolumeUpdateRegion
 
class  FClipmapUpdateBounds
 
class  FGlobalDistanceFieldClipmap
 
class  FGlobalDistanceFieldInfo
 
class  FForwardLightingViewResources
 
struct  FTransientLightFunctionTextureAtlasTile
 
struct  FVolumetricFogLocalLightFunctionInfo
 
class  FVolumetricFogViewResources
 
struct  FVolumetricMeshBatch
 
struct  FSkyMeshBatch
 
struct  FSortedTrianglesMeshBatch
 
struct  FTemporalAAHistory
 
struct  FTSRHistory
 
struct  FScreenSpaceDenoiserHistory
 
struct  FGTAOTAAHistory
 
struct  FPreviousViewInfo
 
struct  FPrimitiveInstanceRange
 
class  FViewInfo
 
struct  FViewInfo::FTranslucencyVolumeMarkData
 
class  FShadowMapRenderTargetsRefCounted
 
struct  FSortedShadowMapAtlas
 
struct  FSortedShadowMaps
 
struct  FOcclusionSubmittedFenceState
 
class  FViewFamilyInfo
 
struct  FComputeLightGridOutput
 
class  FSceneRendererBase
 
class  FSceneRenderer
 
struct  FSceneRenderer::FCustomRenderPassInfo
 
struct  FSceneRenderUpdateInputs
 
class  FMobileSceneRenderer
 
struct  FMobileSceneRenderer::FInitViewTaskDatas
 
struct  FFastVramConfig
 

Namespaces

namespace  Nanite
 

Typedefs

typedef TArray< uint8, SceneRenderingAllocatorFPrimitiveViewMasks
 
typedef TArray< FRDGTextureRef, TInlineAllocator< 6 > > FColorTargets
 

Enumerations

enum  EVolumeUpdateType { VUT_MeshDistanceFields = 1 , VUT_Heightfields = 2 , VUT_All = VUT_MeshDistanceFields | VUT_Heightfields }
 
enum class  EGlobalSDFFullRecaptureReason {
  None , TooManyUpdateBounds , HeightfieldStreaming , MeshSDFStreaming ,
  NoViewState
}
 
enum class  ESceneRenderCommonShowFlags { None = 0 , HitProxies = 1 << 0 , PathTracing = 1 << 1 }
 
enum class  EGPUSkinCacheTransition { FrameSetup , Renderer }
 

Functions

 DECLARE_LOG_CATEGORY_EXTERN (LogSceneCapture, Log, All)
 
bool ShouldUseStereoLumenOptimizations ()
 
 DECLARE_GPU_STAT_NAMED_EXTERN (Postprocessing, TEXT("Postprocessing"))
 
 DECLARE_GPU_STAT_NAMED_EXTERN (CustomRenderPasses, TEXT("CustomRenderPasses"))
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS class UE_DEPRECATED (5.5, "Use GraphBuilder.AddDispatchPass instead") FParallelCommandListBindings
 
TRDGUniformBufferRef< FForwardLightUniformParametersCreateDummyForwardLightUniformBuffer (FRDGBuilder &GraphBuilder, EShaderPlatform ShaderPlatform)
 
void SetDummyForwardLightUniformBufferOnViews (FRDGBuilder &GraphBuilder, EShaderPlatform ShaderPlatform, TArray< FViewInfo > &Views)
 
void SetupVolumetricFogGlobalData (const FViewInfo &View, FVolumetricFogGlobalData &Parameters)
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS PRAGMA_ENABLE_DEPRECATION_WARNINGS int32 GetMaxNumReflectionCaptures (EShaderPlatform ShaderPlatform)
 
 ENUM_CLASS_FLAGS (ESceneRenderCommonShowFlags)
 
template<typename LambdaType , typename PrerequisiteTaskCollectionType >
UE::Tasks::FTask LaunchSceneRenderTask (const TCHAR *DebugName, LambdaType &&Lambda, PrerequisiteTaskCollectionType &&Prerequisites, bool bExecuteInParallelCondition=true, UE::Tasks::ETaskPriority TaskPriority=UE::Tasks::ETaskPriority::High)
 
template<typename LambdaType >
UE::Tasks::FTask LaunchSceneRenderTask (const TCHAR *DebugName, LambdaType &&Lambda, bool bExecuteInParallelCondition=true, UE::Tasks::ETaskPriority TaskPriority=UE::Tasks::ETaskPriority::High)
 
template<typename ReturnType , typename LambdaType , typename PrerequisiteTaskCollectionType >
UE::Tasks::TTask< ReturnType > LaunchSceneRenderTask (const TCHAR *DebugName, LambdaType &&Lambda, PrerequisiteTaskCollectionType &&Prerequisites, bool bExecuteInParallelCondition=true, UE::Tasks::ETaskPriority TaskPriority=UE::Tasks::ETaskPriority::High)
 
template<typename PrerequisiteTaskCollectionType >
FGraphEventRef CreateCompatibilityGraphEvent (PrerequisiteTaskCollectionType &&Prerequisites)
 
RENDERER_API void UpdateNoiseTextureParameters (FViewUniformShaderParameters &ViewUniformShaderParameters)
 
TConstArrayView< FProjectedShadowInfo * > GetProjectedDistanceFieldShadows (const FDynamicShadowsTaskData *TaskData)
 
void BeginShadowGatherDynamicMeshElements (FDynamicShadowsTaskData *TaskData)
 
bool UseCachedMeshDrawCommands ()
 
bool UseCachedMeshDrawCommands_AnyThread ()
 
bool IsDynamicInstancingEnabled (ERHIFeatureLevel::Type FeatureLevel)
 
void AddResolveSceneColorPass (FRDGBuilder &GraphBuilder, const FViewInfo &View, FRDGTextureMSAA SceneColor)
 
void AddResolveSceneDepthPass (FRDGBuilder &GraphBuilder, const FViewInfo &View, FRDGTextureMSAA SceneDepth)
 
void AddResolveSceneColorPass (FRDGBuilder &GraphBuilder, TArrayView< const FViewInfo > Views, FRDGTextureMSAA SceneColor)
 
void AddResolveSceneDepthPass (FRDGBuilder &GraphBuilder, TArrayView< const FViewInfo > Views, FRDGTextureMSAA SceneDepth)
 
void VirtualTextureFeedbackBegin (FRDGBuilder &GraphBuilder, TArrayView< const FViewInfo > Views, FIntPoint SceneTextureExtent)
 
FRDGTextureRef CreateHalfResolutionDepthCheckerboardMinMax (FRDGBuilder &GraphBuilder, TArrayView< const FViewInfo > Views, FRDGTextureRef SceneDepth)
 
FRDGTextureRef CreateQuarterResolutionDepthMinAndMax (FRDGBuilder &GraphBuilder, TArrayView< const FViewInfo > Views, FRDGTextureRef DepthTexture)
 
void CreateQuarterResolutionDepthMinAndMaxFromDepthTexture (FRDGBuilder &GraphBuilder, TArrayView< const FViewInfo > Views, FRDGTextureRef DepthTexture, FRDGTextureRef &OutHalfResMinMax, FRDGTextureRef &OutQuarterResMinMax)
 
FViewFamilyInfoGetViewFamilyInfo (const TArray< FViewInfo > &Views)
 
const FViewFamilyInfoGetViewFamilyInfo (const TArray< const FViewInfo > &Views)
 
FViewFamilyInfoGetViewFamilyInfo (const TArrayView< FViewInfo > &Views)
 
const FViewFamilyInfoGetViewFamilyInfo (const TArrayView< const FViewInfo > &Views)
 
bool IsPrimitiveAlphaHoldoutEnabled (const FViewInfo &View)
 
bool IsPrimitiveAlphaHoldoutEnabledForAnyView (TArrayView< const FViewInfo > Views)
 
bool SceneCaptureRequiresAlphaChannel (const FSceneView &View)
 
bool DoMaterialAndPrimitiveModifyMeshPosition (const FMaterial &Material, const FPrimitiveSceneProxy *PrimitiveSceneProxy)
 

Variables

const int32 GMaxForwardShadowCascades = 4
 
FFastVramConfig GFastVRamConfig
 

Typedef Documentation

◆ FColorTargets

◆ FPrimitiveViewMasks

Masks indicating for which views a primitive needs to have a certain operation on. One entry per primitive in the scene.

Enumeration Type Documentation

◆ EGlobalSDFFullRecaptureReason

Enumerator
None 
TooManyUpdateBounds 
HeightfieldStreaming 
MeshSDFStreaming 
NoViewState 

◆ EGPUSkinCacheTransition

Enumerator
FrameSetup 
Renderer 

◆ ESceneRenderCommonShowFlags

A set of show flags thare are guaranteed to be common among all renderers in the set.

Enumerator
None 
HitProxies 
PathTracing 

◆ EVolumeUpdateType

Enumerator
VUT_MeshDistanceFields 
VUT_Heightfields 
VUT_All 

Function Documentation

◆ AddResolveSceneColorPass() [1/2]

void AddResolveSceneColorPass ( FRDGBuilder GraphBuilder,
const FViewInfo View,
FRDGTextureMSAA  SceneColor 
)

Resolves the view rect of scene color or depth using either a custom resolve or hardware resolve.

◆ AddResolveSceneColorPass() [2/2]

void AddResolveSceneColorPass ( FRDGBuilder GraphBuilder,
TArrayView< const FViewInfo Views,
FRDGTextureMSAA  SceneColor 
)

Resolves all views for scene color / depth.

◆ AddResolveSceneDepthPass() [1/2]

void AddResolveSceneDepthPass ( FRDGBuilder GraphBuilder,
const FViewInfo View,
FRDGTextureMSAA  SceneDepth 
)

Chooses one of many ResolvePS variants

◆ AddResolveSceneDepthPass() [2/2]

void AddResolveSceneDepthPass ( FRDGBuilder GraphBuilder,
TArrayView< const FViewInfo Views,
FRDGTextureMSAA  SceneDepth 
)

◆ BeginShadowGatherDynamicMeshElements()

void BeginShadowGatherDynamicMeshElements ( FDynamicShadowsTaskData TaskData)
extern

Triggers shadow gather dynamic mesh elements task graph to start processing.

◆ CreateCompatibilityGraphEvent()

FGraphEventRef CreateCompatibilityGraphEvent ( PrerequisiteTaskCollectionType &&  Prerequisites)

◆ CreateDummyForwardLightUniformBuffer()

TRDGUniformBufferRef< FForwardLightUniformParameters > CreateDummyForwardLightUniformBuffer ( FRDGBuilder GraphBuilder,
EShaderPlatform  ShaderPlatform 
)
extern

◆ CreateHalfResolutionDepthCheckerboardMinMax()

FRDGTextureRef CreateHalfResolutionDepthCheckerboardMinMax ( FRDGBuilder GraphBuilder,
TArrayView< const FViewInfo Views,
FRDGTextureRef  SceneDepth 
)

Creates a half resolution checkerboard min / max depth buffer from the input full resolution depth buffer.

◆ CreateQuarterResolutionDepthMinAndMax()

FRDGTextureRef CreateQuarterResolutionDepthMinAndMax ( FRDGBuilder GraphBuilder,
TArrayView< const FViewInfo Views,
FRDGTextureRef  DepthTexture 
)

Creates a half resolution depth buffer storing the min and max depth for each 2x2 pixel quad of a half resolution buffer.

◆ CreateQuarterResolutionDepthMinAndMaxFromDepthTexture()

void CreateQuarterResolutionDepthMinAndMaxFromDepthTexture ( FRDGBuilder GraphBuilder,
TArrayView< const FViewInfo Views,
FRDGTextureRef  DepthTexture,
FRDGTextureRef OutHalfResMinMax,
FRDGTextureRef OutQuarterResMinMax 
)

Creates a quarter resolution depth buffer storing the min and max depth for each 4x4 pixel quad of the depth buffer.

◆ DECLARE_GPU_STAT_NAMED_EXTERN() [1/2]

DECLARE_GPU_STAT_NAMED_EXTERN ( CustomRenderPasses  ,
TEXT("CustomRenderPasses")   
)

◆ DECLARE_GPU_STAT_NAMED_EXTERN() [2/2]

DECLARE_GPU_STAT_NAMED_EXTERN ( Postprocessing  ,
TEXT("Postprocessing")   
)

◆ DECLARE_LOG_CATEGORY_EXTERN()

DECLARE_LOG_CATEGORY_EXTERN ( LogSceneCapture  ,
Log  ,
All   
)

◆ DoMaterialAndPrimitiveModifyMeshPosition()

bool DoMaterialAndPrimitiveModifyMeshPosition ( const FMaterial Material,
const FPrimitiveSceneProxy PrimitiveSceneProxy 
)

Checks whether the material and scene proxy combination will modify the mesh position. Useful for determining whether the material can be substituted with a default material for depth rendering etc.

◆ ENUM_CLASS_FLAGS()

ENUM_CLASS_FLAGS ( ESceneRenderCommonShowFlags  )

◆ GetMaxNumReflectionCaptures()

PRAGMA_DISABLE_DEPRECATION_WARNINGS PRAGMA_ENABLE_DEPRECATION_WARNINGS int32 GetMaxNumReflectionCaptures ( EShaderPlatform  ShaderPlatform)
extern

◆ GetProjectedDistanceFieldShadows()

TConstArrayView< FProjectedShadowInfo * > GetProjectedDistanceFieldShadows ( const FDynamicShadowsTaskData TaskData)
extern

Returns the array of shadows with distance fields. Call only after finishing shadow initialization.

◆ GetViewFamilyInfo() [1/4]

const FViewFamilyInfo & GetViewFamilyInfo ( const TArray< const FViewInfo > &  Views)
inline

◆ GetViewFamilyInfo() [2/4]

FViewFamilyInfo & GetViewFamilyInfo ( const TArray< FViewInfo > &  Views)
inline

Returns a family from an array of views, with the assumption that all point to the same view family, which will be true for the "Views" array in the scene renderer. There are some utility functions that receive the Views array, rather than the renderer itself, and this avoids confusing code that accesses Views[0], in addition to validating the assumption that all Views have the same Family. FViewFamilyInfo is used to access FSceneTextures|Config.

◆ GetViewFamilyInfo() [3/4]

const FViewFamilyInfo & GetViewFamilyInfo ( const TArrayView< const FViewInfo > &  Views)
inline

◆ GetViewFamilyInfo() [4/4]

FViewFamilyInfo & GetViewFamilyInfo ( const TArrayView< FViewInfo > &  Views)
inline

◆ IsDynamicInstancingEnabled()

bool IsDynamicInstancingEnabled ( ERHIFeatureLevel::Type  FeatureLevel)
extern

◆ IsPrimitiveAlphaHoldoutEnabled()

bool IsPrimitiveAlphaHoldoutEnabled ( const FViewInfo View)

Checks whether primitive alpha holdout is active.

◆ IsPrimitiveAlphaHoldoutEnabledForAnyView()

bool IsPrimitiveAlphaHoldoutEnabledForAnyView ( TArrayView< const FViewInfo Views)

Checks whether primitive alpha holdout is active for any view.

◆ LaunchSceneRenderTask() [1/3]

template<typename LambdaType >
UE::Tasks::FTask LaunchSceneRenderTask ( const TCHAR DebugName,
LambdaType &&  Lambda,
bool  bExecuteInParallelCondition = true,
UE::Tasks::ETaskPriority  TaskPriority = UE::Tasks::ETaskPriority::High 
)

◆ LaunchSceneRenderTask() [2/3]

UE::Tasks::FTask LaunchSceneRenderTask ( const TCHAR DebugName,
LambdaType &&  Lambda,
PrerequisiteTaskCollectionType &&  Prerequisites,
bool  bExecuteInParallelCondition = true,
UE::Tasks::ETaskPriority  TaskPriority = UE::Tasks::ETaskPriority::High 
)

◆ LaunchSceneRenderTask() [3/3]

UE::Tasks::TTask< ReturnType > LaunchSceneRenderTask ( const TCHAR DebugName,
LambdaType &&  Lambda,
PrerequisiteTaskCollectionType &&  Prerequisites,
bool  bExecuteInParallelCondition = true,
UE::Tasks::ETaskPriority  TaskPriority = UE::Tasks::ETaskPriority::High 
)

◆ SceneCaptureRequiresAlphaChannel()

bool SceneCaptureRequiresAlphaChannel ( const FSceneView View)

◆ SetDummyForwardLightUniformBufferOnViews()

void SetDummyForwardLightUniformBufferOnViews ( FRDGBuilder GraphBuilder,
EShaderPlatform  ShaderPlatform,
TArray< FViewInfo > &  Views 
)
extern

◆ SetupVolumetricFogGlobalData()

void SetupVolumetricFogGlobalData ( const FViewInfo View,
FVolumetricFogGlobalData Parameters 
)
extern

◆ ShouldUseStereoLumenOptimizations()

bool ShouldUseStereoLumenOptimizations ( )
extern

◆ UE_DEPRECATED()

class UE_DEPRECATED ( 5.  5,
"Use GraphBuilder.AddDispatchPass instead"   
)

Helper class to marshal data from your RDG pass into the parallel command list set.

◆ UpdateNoiseTextureParameters()

RENDERER_API void UpdateNoiseTextureParameters ( FViewUniformShaderParameters ViewUniformShaderParameters)

◆ UseCachedMeshDrawCommands()

bool UseCachedMeshDrawCommands ( )
extern

◆ UseCachedMeshDrawCommands_AnyThread()

bool UseCachedMeshDrawCommands_AnyThread ( )
extern

◆ VirtualTextureFeedbackBegin()

void VirtualTextureFeedbackBegin ( FRDGBuilder GraphBuilder,
TArrayView< const FViewInfo Views,
FIntPoint  SceneTextureExtent 
)

Prepares virtual textures for feedback updates.

Variable Documentation

◆ GFastVRamConfig

FFastVramConfig GFastVRamConfig
extern

◆ GMaxForwardShadowCascades

const int32 GMaxForwardShadowCascades = 4