Navigation
API > API/Runtime > API/Runtime/Renderer
| Name | FInstanceCullingContext |
| Type | class |
| Header File | /Engine/Source/Runtime/Renderer/Public/InstanceCulling/InstanceCullingContext.h |
| Include Path | #include "InstanceCulling/InstanceCullingContext.h" |
Syntax
class FInstanceCullingContext
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| InstanceCulling/InstanceCullingContext.h | |||
FInstanceCullingContext
(
EShaderPlatform ShaderPlatform, |
InstanceCulling/InstanceCullingContext.h | ||
FInstanceCullingContext
(
const TCHAR* PassName, |
Create an instance culling context to process draw commands that can be culled using GPU-Scene. | InstanceCulling/InstanceCullingContext.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FInstanceCullingContext() |
InstanceCulling/InstanceCullingContext.h |
Structs
| Name | Remarks |
|---|---|
| FCompactionData | |
| FMeshDrawCommandInfo | Auxiliary info for each mesh draw command that needs submitting. |
| FPayloadData |
Enums
Public
| Name | Remarks |
|---|---|
| EAsyncProcessingMode | |
| EInstanceFlags |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| LoadBalancerArray | TStaticArray< FInstanceProcessingGPULoadBalancer *, static_cast< uint32 >(EBatchProcessingMode::Num)> | InstanceCulling/InstanceCullingContext.h | |
| SyncPrerequisitesFuncType | TFunction< void(FInstanceCullingContext &InstanceCullingContext)> | InstanceCulling/InstanceCullingContext.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CompactionBlockNumInstances | uint32 | InstanceCulling/InstanceCullingContext.h | |
| IndirectArgsNumWords | uint32 | InstanceCulling/InstanceCullingContext.h | |
| UniformViewInstanceStride | uint32 | InstanceCulling/InstanceCullingContext.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsEnabled | bool | InstanceCulling/InstanceCullingContext.h | ||
| bUsesUniformBufferView | bool | Whether current platform uses 'Uniform Buffer View' path. | InstanceCulling/InstanceCullingContext.h | |
| CompactionBlockDataIndices | TArray< uint32, SceneRenderingAllocator > | InstanceCulling/InstanceCullingContext.h | ||
| DrawCommandCompactionData | TArray< FCompactionData, SceneRenderingAllocator > | InstanceCulling/InstanceCullingContext.h | ||
| DrawCommandDescs | TArray< uint32, SceneRenderingAllocator > | InstanceCulling/InstanceCullingContext.h | ||
| DynamicInstanceIdNum | int32 | InstanceCulling/InstanceCullingContext.h | ||
| DynamicInstanceIdOffset | int32 | InstanceCulling/InstanceCullingContext.h | ||
| Flags | EInstanceCullingFlags | InstanceCulling/InstanceCullingContext.h | ||
| IndirectArgs | TArray< FRHIDrawIndexedIndirectParameters, SceneRenderingAllocator > | InstanceCulling/InstanceCullingContext.h | ||
| InstanceCullingManager | FInstanceCullingManager * | InstanceCulling/InstanceCullingContext.h | ||
| InstanceCullingMode | EInstanceCullingMode | InstanceCulling/InstanceCullingContext.h | ||
| InstanceCullingStaticSlot | FUniformBufferStaticSlot | Static uniform buffer slot for InstanceCulling/BatchedPrimitive UB. Only valid for a mobile renderer, which needs to handle cases with a manualy merged render-passes. | InstanceCulling/InstanceCullingContext.h | |
| InstanceIdOffsets | TArray< uint32, SceneRenderingAllocator > | InstanceCulling/InstanceCullingContext.h | ||
| LoadBalancers | LoadBalancerArray | Driver for collecting items using one mode of processing. | InstanceCulling/InstanceCullingContext.h | |
| MeshDrawCommandInfos | TArray< FMeshDrawCommandInfo, SceneRenderingAllocator > | InstanceCulling/InstanceCullingContext.h | ||
| MeshDrawCommandPassStats | FMeshDrawCommandPassStats * | Optional pass stats. | InstanceCulling/InstanceCullingContext.h | |
| NumCompactionInstances | uint32 | InstanceCulling/InstanceCullingContext.h | ||
| PayloadData | TArray< FPayloadData, SceneRenderingAllocator > | InstanceCulling/InstanceCullingContext.h | ||
| PrevHZB | TRefCountPtr< IPooledRenderTarget > | InstanceCulling/InstanceCullingContext.h | ||
| ShaderPlatform | EShaderPlatform | InstanceCulling/InstanceCullingContext.h | ||
| SingleInstanceProcessingMode | EBatchProcessingMode | Processing mode to use for single-instance primitives, default to skip culling, as this is already done on CPU. | InstanceCulling/InstanceCullingContext.h | |
| SyncPrerequisitesFunc | SyncPrerequisitesFuncType | InstanceCulling/InstanceCullingContext.h | ||
| TotalInstances | uint32 | InstanceCulling/InstanceCullingContext.h | ||
| ViewIds | TArray< int32, TInlineAllocator< 6, SceneRenderingAllocator > > | InstanceCulling/InstanceCullingContext.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddInstanceRunsToDrawCommand
(
uint32 IndirectArgsOffset, |
Command that is executed in the per-view, post-cull pass to gather up the instances belonging to this primitive. | InstanceCulling/InstanceCullingContext.h | |
void AddInstancesToDrawCommand
(
uint32 IndirectArgsOffset, |
InstanceCulling/InstanceCullingContext.h | ||
void AddInstancesToDrawCommand
(
uint32 IndirectArgsOffset, |
Add command to cull a range of instances for the given mesh draw command index. | InstanceCulling/InstanceCullingContext.h | |
uint32 AllocateIndirectArgs
(
const FMeshDrawCommand* MeshDrawCommand |
Allocate space for indirect draw call argumens for a given MeshDrawCommand and initialize with draw command data. | InstanceCulling/InstanceCullingContext.h | |
void BeginAsyncSetup
(
SyncPrerequisitesFuncType&& InSyncPrerequisitesFunc |
Set up the context to track an async setup process, or some deferred setup work. | InstanceCulling/InstanceCullingContext.h | |
void BuildRenderingCommands
(
FRDGBuilder& GraphBuilder, |
This version is never deferred, nor async, calling BeginAsyncSetup before this is an error. | InstanceCulling/InstanceCullingContext.h | |
void BuildRenderingCommands
(
FRDGBuilder& GraphBuilder, |
This BuildRenderingCommands operation may be deferred and merged into a global pass when possible. | InstanceCulling/InstanceCullingContext.h | |
void BuildRenderingCommandsInternal
(
FRDGBuilder& GraphBuilder, |
InstanceCulling/InstanceCullingContext.h | ||
EInstanceCullingMode GetInstanceCullingMode() |
InstanceCulling/InstanceCullingContext.h | ||
uint32 GetInstanceIdNumElements() |
InstanceCulling/InstanceCullingContext.h | ||
bool HasCullingCommands () |
Returns true if there are any instances in this context needing to be rendered. | InstanceCulling/InstanceCullingContext.h | |
bool IsEnabled() |
InstanceCulling/InstanceCullingContext.h | ||
bool IsInstanceOrderPreservationEnabled() |
InstanceCulling/InstanceCullingContext.h | ||
void ResetCommands
(
int32 MaxNumCommands |
Call to empty out the culling commands & other culling data. | InstanceCulling/InstanceCullingContext.h | |
void SetDynamicPrimitiveInstanceOffsets
(
int32 InDynamicInstanceIdOffset, |
InstanceCulling/InstanceCullingContext.h | ||
void SetupDrawCommands
(
FMeshCommandOneFrameArray& VisibleMeshDrawCommandsInOut, |
Allocate indirect arg slots for all meshes to use instancing, add commands that populate the indirect calls and index & id buffers, and Collapse all commands that share the same state bucket ID NOTE: VisibleMeshDrawCommandsInOut can only become shorter. | InstanceCulling/InstanceCullingContext.h | |
uint32 StepInstanceDataOffsetBytes
(
uint32 NumStepDraws |
Computes instance data byte offset for a next draw command taking into account platform specifics | InstanceCulling/InstanceCullingContext.h | |
void SubmitDrawCommands
(
const FMeshCommandOneFrameArray& VisibleMeshDrawCommands, |
InstanceCulling/InstanceCullingContext.h | ||
void WaitForSetupTask() |
Calls the sync function passed tp BeginAsyncSetup to ensure the setup processing is completed. | InstanceCulling/InstanceCullingContext.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddClearIndirectArgInstanceCountPass
(
FRDGBuilder& GraphBuilder, |
Helper function to add a pass to zero the instance count in the indirect args. | InstanceCulling/InstanceCullingContext.h | |
static FInstanceCullingDeferredContext * CreateDeferredContext
(
FRDGBuilder& GraphBuilder, |
Add a batched BuildRenderingCommands pass. | InstanceCulling/InstanceCullingContext.h | |
static const TRDGUniformBufferRef< FInstanceCullingGlobalUniforms > CreateDummyInstanceCullingUniformBuffer
(
FRDGBuilder& GraphBuilder |
InstanceCulling/InstanceCullingContext.h | ||
static uint32 GetInstanceIdBufferStride
(
EShaderPlatform ShaderPlatform |
InstanceCulling/InstanceCullingContext.h | ||
static FUniformBufferStaticSlot GetStaticUniformBufferSlot
(
EShaderPlatform ShaderPlatform |
InstanceCulling/InstanceCullingContext.h | ||
static bool IsGPUCullingEnabled() |
InstanceCulling/InstanceCullingContext.h | ||
static bool IsOcclusionCullingEnabled() |
InstanceCulling/InstanceCullingContext.h |