UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FInstanceCullingManager Class Reference

#include <InstanceCullingManager.h>

Public Member Functions

 FInstanceCullingManager (FRDGBuilder &GraphBuilder, const FScene &InScene, FSceneUniformBuffer &InSceneUniforms, FRendererViewDataManager &InViewDataManager)
 
 ~FInstanceCullingManager ()
 
bool IsEnabled () const
 
int32 RegisterView (const Nanite::FPackedViewParams &Params)
 
void AllocateViews (int32 NumViews)
 
const TRDGUniformBufferRef< FInstanceCullingGlobalUniformsGetDummyInstanceCullingUniformBuffer () const
 
void BeginDeferredCulling (FRDGBuilder &GraphBuilder)
 
bool IsDeferredCullingActive () const
 
int32 GetBinIndex (EBatchProcessingMode Mode, const TRefCountPtr< IPooledRenderTarget > &HZB)
 
void SetDummyCullingParams (FRDGBuilder &GraphBuilder, FInstanceCullingDrawParams &Parameters)
 

Static Public Member Functions

static bool AllowBatchedBuildRenderingCommands (const FGPUScene &GPUScene)
 

Public Attributes

FRDGBufferRef InstanceOcclusionQueryBuffer = {}
 
EPixelFormat InstanceOcclusionQueryBufferFormat = PF_Unknown
 
TArray< TRefCountPtr< IPooledRenderTarget > > ViewPrevHZBs
 

Friends

class FInstanceCullingContext
 

Detailed Description

Manages allocation of indirect arguments and culling jobs for all instanced draws (use the GPU Scene culling).

Constructor & Destructor Documentation

◆ FInstanceCullingManager()

FInstanceCullingManager::FInstanceCullingManager ( FRDGBuilder GraphBuilder,
const FScene InScene,
FSceneUniformBuffer InSceneUniforms,
FRendererViewDataManager InViewDataManager 
)

Construct the instance culling manager for a scene renderer with the set of primary views that are used.

◆ ~FInstanceCullingManager()

FInstanceCullingManager::~FInstanceCullingManager ( )

Member Function Documentation

◆ AllocateViews()

void FInstanceCullingManager::AllocateViews ( int32  NumViews)

◆ AllowBatchedBuildRenderingCommands()

bool FInstanceCullingManager::AllowBatchedBuildRenderingCommands ( const FGPUScene GPUScene)
static

◆ BeginDeferredCulling()

void FInstanceCullingManager::BeginDeferredCulling ( FRDGBuilder GraphBuilder)

Add a deferred, batched, gpu culling pass. Each batch represents a BuildRenderingCommands call from a mesh pass. Batches are collected as we walk through the main render setup and call BuildRenderingCommands, and are processed when RDG Execute or Drain is called. This implicitly ends the deferred context, so if Drain is used, it should be paired with a new call to BeginDeferredCulling. Can be called multiple times, and will collect subsequent BuildRenderingCommands. Care must be taken that the views referenced in the build rendering commands have been registered before BeginDeferredCulling. Calls FlushRegisteredViews that uploads the registered views to the GPU.

◆ GetBinIndex()

int32 FInstanceCullingManager::GetBinIndex ( EBatchProcessingMode  Mode,
const TRefCountPtr< IPooledRenderTarget > &  HZB 
)

◆ GetDummyInstanceCullingUniformBuffer()

const TRDGUniformBufferRef< FInstanceCullingGlobalUniforms > FInstanceCullingManager::GetDummyInstanceCullingUniformBuffer ( ) const
inline

◆ IsDeferredCullingActive()

bool FInstanceCullingManager::IsDeferredCullingActive ( ) const
inline

Whether we are actively batching GPU instance culling work.

◆ IsEnabled()

bool FInstanceCullingManager::IsEnabled ( ) const
inline

◆ RegisterView()

int32 FInstanceCullingManager::RegisterView ( const Nanite::FPackedViewParams Params)

◆ SetDummyCullingParams()

void FInstanceCullingManager::SetDummyCullingParams ( FRDGBuilder GraphBuilder,
FInstanceCullingDrawParams Parameters 
)

Friends And Related Symbol Documentation

◆ FInstanceCullingContext

Member Data Documentation

◆ InstanceOcclusionQueryBuffer

FRDGBufferRef FInstanceCullingManager::InstanceOcclusionQueryBuffer = {}

◆ InstanceOcclusionQueryBufferFormat

EPixelFormat FInstanceCullingManager::InstanceOcclusionQueryBufferFormat = PF_Unknown

◆ ViewPrevHZBs

TArray<TRefCountPtr<IPooledRenderTarget> > FInstanceCullingManager::ViewPrevHZBs

The documentation for this class was generated from the following files: