Navigation
API > API/Runtime > API/Runtime/Renderer > API/Runtime/Renderer/InstanceCulling
References
| Module | Renderer |
| Header | /Engine/Source/Runtime/Renderer/Public/InstanceCulling/InstanceCullingContext.h |
| Include | #include "InstanceCulling/InstanceCullingContext.h" |
Syntax
class FInstanceCullingContext
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bIsEnabled | ||
| TArray< uint32, SceneRenderingAllocator > | CompactionBlockDataIndices | ||
| TArray< FCompactionData, SceneRenderingAllocator > | DrawCommandCompactionData | ||
| TArray< uint32, SceneRenderingAllocator > | DrawCommandDescs | ||
| int32 | DynamicInstanceIdNum | ||
| int32 | DynamicInstanceIdOffset | ||
| ERHIFeatureLevel::Type | FeatureLevel | ||
| EInstanceCullingFlags | Flags | ||
| TArray< FRHIDrawIndexedIndirectParameters, SceneRenderingAllocator > | IndirectArgs | ||
| FInstanceCullingManager * | InstanceCullingManager | ||
| EInstanceCullingMode | InstanceCullingMode | ||
| TArray< uint32, SceneRenderingAllocator > | InstanceIdOffsets | ||
| LoadBalancerArray | LoadBalancers | Driver for collecting items using one mode of processing. | |
| TArray< FMeshDrawCommandInfo, SceneRenderingAllocator > | MeshDrawCommandInfos | ||
| uint32 | NumCompactionInstances | ||
| TArray< FPayloadData, SceneRenderingAllocator > | PayloadData | ||
| TRefCountPtr< IPooledRenderTarget > | PrevHZB | ||
| EBatchProcessingMode | SingleInstanceProcessingMode | Processing mode to use for single-instance primitives, default to skip culling, as this is already done on CPU. | |
| SyncPrerequisitesFuncType | SyncPrerequisitesFunc | ||
| uint32 | TotalInstances | ||
| TArray< int32, TInlineAllocator< 6, SceneRenderingAllocator > > | ViewIds |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FInstanceCullingContext
(
ERHIFeatureLevel::Type FeatureLevel, |
Create an instance culling context to process draw commands that can be culled using GPU-Scene. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddClearIndirectArgInstanceCountPass
(
FRDGBuilder& GraphBuilder, |
Helper function to add a pass to zero the instance count in the indirect args. | |
| void | AddInstanceRunsToDrawCommand
(
uint32 IndirectArgsOffset, |
Command that is executed in the per-view, post-cull pass to gather up the instances belonging to this primitive. | |
| void | AddInstancesToDrawCommand
(
uint32 IndirectArgsOffset, |
Add command to cull a range of instances for the given mesh draw command index. | |
| uint32 | AllocateIndirectArgs
(
const FMeshDrawCommand* MeshDrawCommand |
Allocate space for indirect draw call argumens for a given MeshDrawCommand and initialize with draw command data. | |
| void | BeginAsyncSetup
(
SyncPrerequisitesFuncType&& InSyncPrerequisitesFunc |
Set up the context to track an async setup process, or some deferred setup work. | |
| void | BuildRenderingCommands
(
FRDGBuilder& GraphBuilder, |
This version is never deferred, nor async, calling BeginAsyncSetup before this is an error. | |
| void | BuildRenderingCommands
(
FRDGBuilder& GraphBuilder, |
This BuildRenderingCommands operation may be deferred and merged into a global pass when possible. | |
| void | BuildRenderingCommandsInternal
(
FRDGBuilder& GraphBuilder, |
||
| FInstanceCullingDeferredContext * | CreateDeferredContext
(
FRDGBuilder& GraphBuilder, |
Add a batched BuildRenderingCommands pass. | |
| const TRDGUniformBufferRef< FInstanceCullingGlobalUniforms > | CreateDummyInstanceCullingUniformBuffer
(
FRDGBuilder& GraphBuilder |
||
| EInstanceCullingMode | |||
| uint32 | GetInstanceIdBufferStride
(
ERHIFeatureLevel::Type FeatureLevel |
||
| bool | Returns true if there are any instances in this context needing to be rendered. | ||
| bool | IsEnabled () |
||
| bool | |||
| bool | |||
| void | ResetCommands
(
int32 MaxNumCommands |
Call to empty out the culling commands & other culling data. | |
| void | SetDynamicPrimitiveInstanceOffsets
(
int32 InDynamicInstanceIdOffset, |
||
| void | SetupDrawCommands
(
FMeshCommandOneFrameArray& VisibleMeshDrawCommandsInOut, |
||
| void | SetupDrawCommands
(
TArrayView< const FStateBucketAuxData > StateBucketsAuxData, |
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. | |
| uint32 | StepInstanceDataOffset
(
ERHIFeatureLevel::Type FeatureLevel, |
||
| void | SubmitDrawCommands
(
const FMeshCommandOneFrameArray& VisibleMeshDrawCommands, |
||
| void | Calls the sync function passed tp BeginAsyncSetup to ensure the setup processing is completed. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FCompactionData | |||
| FMeshDrawCommandInfo | Auxiliary info for each mesh draw command that needs submitting. | ||
| FPayloadData |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EAsyncProcessingMode | |||
| EInstanceFlags |
Typedefs
| Name | Description |
|---|---|
| LoadBalancerArray | |
| SyncPrerequisitesFuncType |
Constants
| Name | Description |
|---|---|
| CompactionBlockNumInstances | |
| IndirectArgsNumWords |