Navigation
API > API/Runtime > API/Runtime/Renderer
The renderer's internal state for a single UPrimitiveComponent. This has a one to one mapping with FPrimitiveSceneProxy, which is in the engine module.
| Name | FPrimitiveSceneInfo |
| Type | class |
| Header File | /Engine/Source/Runtime/Renderer/Public/PrimitiveSceneInfo.h |
| Include Path | #include "PrimitiveSceneInfo.h" |
Syntax
class FPrimitiveSceneInfo : public FDeferredCleanupInterface
Inheritance Hierarchy
- FDeferredCleanupInterface → FPrimitiveSceneInfo
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPrimitiveSceneInfo
(
const FPrimitiveSceneInfoAdapter& InAdapter, |
PrimitiveSceneInfo.h | ||
FPrimitiveSceneInfo
(
FPrimitiveSceneDesc* InPrimitiveSceneDesc, |
PrimitiveSceneInfo.h | ||
FPrimitiveSceneInfo
(
UPrimitiveComponent* InPrimitive, |
Initialization constructor. | PrimitiveSceneInfo.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FPrimitiveSceneInfo() |
Destructor. | PrimitiveSceneInfo.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FPersistentId | FPersistentPrimitiveIndex | PrimitiveSceneInfo.h | |
| FPrimitiveSceneInfoEvent | TMulticastDelegate_NoParams< void > | PrimitiveSceneInfo.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| MaxCachedReflectionCaptureProxies | const uint32 | PrimitiveSceneInfo.h | |
| OnGPUSceneInstancesAllocated | FPrimitiveSceneInfoEvent | PrimitiveSceneInfo.h | |
| OnGPUSceneInstancesFreed | FPrimitiveSceneInfoEvent | PrimitiveSceneInfo.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bNeedsCachedReflectionCaptureUpdate | bool | Whether the primitive is newly registered or moved and CachedReflectionCaptureProxy needs to be updated on the next render. | PrimitiveSceneInfo.h | |
| bShouldRenderInMainPass | bool | Set to true for the primitive to be rendered in the main pass to be visible in a view. | PrimitiveSceneInfo.h | |
| bVisibleInRealTimeSkyCapture | bool | Set to true for the primitive to be rendered into the real-time sky light reflection capture. | PrimitiveSceneInfo.h | |
| bWritesRuntimeVirtualTexture | bool | True if the primitive can write to runtime virtual texture. | PrimitiveSceneInfo.h | |
| CachedPlanarReflectionProxy | const FPlanarReflectionSceneProxy * | Planar reflection that was closest to this primitive, used for forward reflections. | PrimitiveSceneInfo.h | |
| CachedReflectionCaptureProxies | const FReflectionCaptureProxy * | PrimitiveSceneInfo.h | ||
| CachedReflectionCaptureProxy | const FReflectionCaptureProxy * | Reflection capture proxy that was closest to this primitive, used for the forward shading rendering path. | PrimitiveSceneInfo.h | |
| DefaultDynamicHitProxy | HHitProxy * | The hit proxy which is used to represent the primitive's dynamic elements. | PrimitiveSceneInfo.h | |
| DefaultDynamicHitProxyId | FHitProxyId | The ID of the hit proxy which is used to represent the primitive's dynamic elements. | PrimitiveSceneInfo.h | |
| DistanceFieldInstanceIndices | TArray< int32, TInlineAllocator< 1 > > | Mapping from instance index in this primitive to index in the global distance field object buffers. | PrimitiveSceneInfo.h | |
| GpuLodInstanceRadius | float | The sphere radius to use for per instance GPU Lodding. | PrimitiveSceneInfo.h | |
| HitProxies | TArray< TRefCountPtr< HHitProxy > > | The hit proxies used by the primitive. | PrimitiveSceneInfo.h | |
| IndirectLightingCacheAllocation | const FIndirectLightingCacheAllocation * | Caches the primitive's indirect lighting cache allocation. | PrimitiveSceneInfo.h | |
| IndirectLightingCacheUniformBuffer | TUniformBufferRef< FIndirectLightingCacheUniformParameters > | The uniform buffer holding precomputed lighting parameters for the indirect lighting cache allocation. | PrimitiveSceneInfo.h | |
| LastRenderTime | float | Last render time in seconds since level started play. | PrimitiveSceneInfo.h | |
| LightingAttachmentRoot | FPrimitiveComponentId | The root attachment component id for use with lighting, if valid. | PrimitiveSceneInfo.h | |
| LightList | FLightPrimitiveInteraction * | The list of lights affecting this primitive. | PrimitiveSceneInfo.h | |
| LODParentComponentId | FPrimitiveComponentId | The component id of the LOD parent if valid. | PrimitiveSceneInfo.h | |
| LumenPrimitiveGroupIndices | TArray< int32, TInlineAllocator< 1 > > | Mapping from instance index in this primitive to index in the LumenPrimitiveGroup array. | PrimitiveSceneInfo.h | |
| NaniteMaterialSlots | TArray< FNaniteMaterialSlot > | PrimitiveSceneInfo.h | ||
| NaniteRasterBins | TArray< FNaniteRasterBin > | PrimitiveSceneInfo.h | ||
| NaniteShadingBins | TArray< FNaniteShadingBin > | PrimitiveSceneInfo.h | ||
| NumMobileDynamicLocalLights | int32 | The number of local lights with dynamic lighting for mobile | PrimitiveSceneInfo.h | |
| OctreeId | FOctreeElementId2 | The identifier for the primitive in Scene->PrimitiveOctree. | PrimitiveSceneInfo.h | |
| PrimitiveComponentId | FPrimitiveComponentId | Id for the component this primitive belongs to. | PrimitiveSceneInfo.h | |
| Proxy | FPrimitiveSceneProxy * | The render proxy for the primitive. | PrimitiveSceneInfo.h | |
| Scene | FScene * | The scene the primitive is in. | PrimitiveSceneInfo.h | |
| StaticMeshCommandInfos | TArray< class FCachedMeshDrawCommandInfo > | The primitive's cached mesh draw commands infos for all static meshes. | PrimitiveSceneInfo.h | |
| StaticMeshes | TArray< class FStaticMeshBatch > | The primitive's static meshes. | PrimitiveSceneInfo.h | |
| StaticMeshRelevances | TArray< class FStaticMeshBatchRelevance > | The primitive's static mesh relevances. | PrimitiveSceneInfo.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIndirectLightingCacheBufferDirty | bool | If this is TRUE, this primitive's indirect lighting cache buffer needs to be updated before it can be rendered. | PrimitiveSceneInfo.h | |
| bNaniteRasterBinsRenderCustomDepth | bool | True if the Nanite raster bins were registered with custom depth enabled | PrimitiveSceneInfo.h | |
| bNeedsUniformBufferUpdate | bool | If this is TRUE, this primitive's uniform buffer needs to be updated before it can be rendered. | PrimitiveSceneInfo.h | |
| bPendingAddStaticMeshes | bool | True if the primitive is queued to have static meshes built. | PrimitiveSceneInfo.h | |
| bPendingAddToScene | bool | True if the primitive is queued for add. | PrimitiveSceneInfo.h | |
| bPendingDelete | bool | True if the primitive is queued for deletion. | PrimitiveSceneInfo.h | |
| bPendingFlushRuntimeVirtualTexture | bool | True if the primitive is queued to have its runtime virtual texture flushed. | PrimitiveSceneInfo.h | |
| bRegisteredLightmapVirtualTextureProducerCallback | bool | If this is TRUE, this primitive has registered with the virtual texture system for a callback on virtual texture changes. | PrimitiveSceneInfo.h | |
| bRegisteredWithVelocityData | bool | True if the primitive registered with velocity data and needs to remove itself when being removed from the scene. | PrimitiveSceneInfo.h | |
| InstanceDataUpdateTaskInfo | FInstanceDataUpdateTaskInfo * | PrimitiveSceneInfo.h | ||
| InstancePayloadDataOffset | int32 | Offset into the scene's instance payload data buffer, when GPUScene is enabled. | PrimitiveSceneInfo.h | |
| InstancePayloadDataStride | int32 | Number of float4 payload data values per instance | PrimitiveSceneInfo.h | |
| InstanceSceneDataBuffersInternal | const FInstanceSceneDataBuffers * | Don't access this directly, even internally unless you are sure what you're up to. Use GetInstanceSceneDataBuffers() which handles thread safety. | PrimitiveSceneInfo.h | |
| InstanceSceneDataOffset | int32 | Offset into the scene's instance scene data buffer, when GPUScene is enabled. | PrimitiveSceneInfo.h | |
| LevelUpdateNotificationIndex | int32 | Index into the scene's PrimitivesNeedingLevelUpdateNotification array for this primitive scene info level. | PrimitiveSceneInfo.h | |
| LightmapDataOffset | int32 | Offset into the scene's lightmap data buffer, when GPUScene is enabled. | PrimitiveSceneInfo.h | |
| NumInstanceSceneDataEntries | int32 | Number of entries in the scene's instance scene data buffer. | PrimitiveSceneInfo.h | |
| NumLightmapDataEntries | int32 | Number of entries in the scene's lightmap data buffer. | PrimitiveSceneInfo.h | |
| PackedIndex | int32 | The index of the primitive in the scene's packed arrays. | PrimitiveSceneInfo.h | |
| PersistentIndex | FPersistentPrimitiveIndex | See GetPersistentIndex() | PrimitiveSceneInfo.h | |
| PrimitiveComponentInterfaceForDebuggingOnly | IPrimitiveComponent * | The IPrimitiveComponentInterface this scene info is for, useful for quickly inspecting properties on the corresponding component while debugging. | PrimitiveSceneInfo.h | |
| RuntimeVirtualTextureLodInfo | FPrimitiveRuntimeVirtualTextureLodInfo | Packed LOD info used for selecting LOD when rendering to a runtime virtual texture. | PrimitiveSceneInfo.h | |
| SceneData | FPrimitiveSceneInfoData * | Ptr to the FPrimitiveSceneInfoData for this prim, this is used for shared data between the primitive and the component that created the primitive. | PrimitiveSceneInfo.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyWorldOffset
(
FRHICommandListBase& RHICmdList, |
Shifts primitive position and all relevant data by an arbitrary delta. | PrimitiveSceneInfo.h | |
void CacheReflectionCaptures() |
Cache per-primitive reflection captures used for mobile/forward rendering. | PrimitiveSceneInfo.h | |
void FlushRuntimeVirtualTexture() |
Mark the runtime virtual textures covered by this primitive as dirty. | PrimitiveSceneInfo.h | |
void FreeGPUSceneInstances() |
PrimitiveSceneInfo.h | ||
void GatherLightingAttachmentGroupPrimitives
(
TArray< FPrimitiveSceneInfo*, SceneRenderingAllocator >& OutChildSceneInfos |
Builds an array of all primitive scene info's in this primitive's attachment group. | PrimitiveSceneInfo.h | |
void GatherLightingAttachmentGroupPrimitives
(
TArray< const FPrimitiveSceneInfo*, SceneRenderingAllocator >& OutChildSceneInfos |
PrimitiveSceneInfo.h | ||
FBoxSphereBounds GetAttachmentGroupBounds () |
Builds a cumulative bounding box of this primitive and all the primitives in the same attachment group. | PrimitiveSceneInfo.h | |
UPrimitiveComponent * GetComponentForDebugOnly() |
PrimitiveSceneInfo.h | ||
IPrimitiveComponent * GetComponentInterfaceForDebugOnly() |
PrimitiveSceneInfo.h | ||
FString GetFullnameForDebuggingOnly() |
Return primitive fullname (for debugging only). | PrimitiveSceneInfo.h | |
int32 GetIndex () |
Retrieves the index of the primitive in the scene's primitives array. | PrimitiveSceneInfo.h | |
const int32 * GetIndexAddress () |
Retrieves the address of the primitives index into in the scene's primitives array. | PrimitiveSceneInfo.h | |
| Returns the updated header data in the InstanceDataUpdateTaskInfo without blocking. | PrimitiveSceneInfo.h | ||
int32 GetInstancePayloadDataOffset() |
PrimitiveSceneInfo.h | ||
int32 GetInstancePayloadDataStride() |
PrimitiveSceneInfo.h | ||
const FInstanceSceneDataBuffers * GetInstanceSceneDataBuffers() |
Waits for (potential) instance update to produce the data, to avoid a sync, use GetInstanceDataHeader(). | PrimitiveSceneInfo.h | |
int32 GetInstanceSceneDataOffset() |
PrimitiveSceneInfo.h | ||
int32 GetLightmapDataOffset() |
PrimitiveSceneInfo.h | ||
FMeshDrawCommandPrimitiveIdInfo GetMDCIdInfo() |
PrimitiveSceneInfo.h | ||
uint32 GetMemoryFootprint() |
Size this class uses in bytes | PrimitiveSceneInfo.h | |
const FMeshBatch * GetMeshBatch
(
int8 InLODIndex |
Will output the FMeshBatch associated with the specified LODIndex. | PrimitiveSceneInfo.h | |
int32 GetNumInstanceSceneDataEntries() |
PrimitiveSceneInfo.h | ||
int32 GetNumLightmapDataEntries() |
PrimitiveSceneInfo.h | ||
FString GetOwnerActorNameOrLabelForDebuggingOnly() |
Return primitive Owner actor name (for debugging only). | PrimitiveSceneInfo.h | |
| Persistent index of the primitive in the range [0, FScene::GetMaxPersistentPrimitiveIndex() ). | PrimitiveSceneInfo.h | ||
FPrimitiveRuntimeVirtualTextureLodInfo const & GetRuntimeVirtualTextureLodInfo() |
Get the packed LodInfo. | PrimitiveSceneInfo.h | |
const FPrimitiveSceneInfoData * GetSceneData() |
Returns the primitive scene data for this proxy. | PrimitiveSceneInfo.h | |
void GetStaticMeshesLODRange
(
int8& OutMinLOD, |
Will output the LOD ranges of the static meshes used with this primitive. | PrimitiveSceneInfo.h | |
bool HasInstanceDataBuffers() |
PrimitiveSceneInfo.h | ||
bool IsIndexValid() |
Simple comparison against the invalid values used before/after scene add/remove. | PrimitiveSceneInfo.h | |
void LinkAttachmentGroup() |
Adds the primitive to the scene's attachment groups. | PrimitiveSceneInfo.h | |
void LinkLODParentComponent() |
Set LOD Parent primitive information to the scene. | PrimitiveSceneInfo.h | |
void MarkGPUStateDirty
(
EPrimitiveDirtyState PrimitiveDirtyState |
Marks the primitive UB as needing updated and requests a GPU scene update | PrimitiveSceneInfo.h | |
void MarkIndirectLightingCacheBufferDirty() |
PrimitiveSceneInfo.h | ||
bool NeedsIndirectLightingCacheBufferUpdate() |
Return true if we need to call LazyUpdateForRendering | PrimitiveSceneInfo.h | |
bool NeedsReflectionCaptureUpdate() |
Returns whether the primitive needs to call CacheReflectionCaptures. | PrimitiveSceneInfo.h | |
void RefreshNaniteRasterBins () |
Refreshes a primitive's references to raster bins. | PrimitiveSceneInfo.h | |
void RemoveCachedReflectionCaptures() |
Nulls out the cached per-primitive reflection captures. | PrimitiveSceneInfo.h | |
void RemoveFromScene
(
bool bUpdateStaticDrawLists |
Removes the primitive from the scene. | PrimitiveSceneInfo.h | |
void RemoveStaticMeshes() |
Removes the primitive's static meshes from the scene. | PrimitiveSceneInfo.h | |
bool RequestGPUSceneUpdate
(
EPrimitiveDirtyState PrimitiveDirtyState |
Adds a request to update GPU scene representation. | PrimitiveSceneInfo.h | |
void RequestStaticMeshUpdate() |
Sets a flag to update the primitive's static meshes before it is next rendered. | PrimitiveSceneInfo.h | |
bool RequestUniformBufferUpdate() |
Sets a flag to update the primitive's uniform buffer before it is next rendered. | PrimitiveSceneInfo.h | |
bool ShouldCacheShadowAsStatic() |
PrimitiveSceneInfo.h | ||
void UnlinkAttachmentGroup() |
Removes the primitive from the scene's attachment groups. | PrimitiveSceneInfo.h | |
void UnlinkLODParentComponent() |
Clear LOD parent primitive information from the scene. | PrimitiveSceneInfo.h | |
void UpdateComponentLastRenderTime
(
float CurrentWorldTime, |
Helper function for writing out to the last render times to the game thread | PrimitiveSceneInfo.h | |
void UpdateIndirectLightingCacheBuffer
(
FRHICommandListBase& RHICmdList |
PrimitiveSceneInfo.h | ||
void UpdateOcclusionFlags() |
Update the occlusion flags for this primitive. | PrimitiveSceneInfo.h | |
int32 UpdateStaticLightingBuffer() |
Updates static lighting uniform buffer, returns the number of entries needed for GPUScene | PrimitiveSceneInfo.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddStaticMeshes
(
FRHICommandListBase& RHICmdList, |
Adds the primitive's static meshes to the scene. | PrimitiveSceneInfo.h | |
static void AddToScene
(
FScene* Scene, |
Adds the primitive to the scene. | PrimitiveSceneInfo.h | |
static void AllocateGPUSceneInstances
(
FScene* Scene, |
Allocate/Free slots for instance data in GPU-Scene | PrimitiveSceneInfo.h | |
static void CacheMeshDrawCommands
(
FScene* Scene, |
Creates cached mesh draw commands for all meshes. | PrimitiveSceneInfo.h | |
static void CacheNaniteMaterialBins
(
FScene* Scene, |
Constructs Nanite raster and shading bin information for unique material instances found within the scene. | PrimitiveSceneInfo.h | |
static void UpdateStaticMeshes
(
FScene* Scene, |
Updates the primitive's static meshes in the scene. | PrimitiveSceneInfo.h |