![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <PrimitiveSceneProxy.h>
Inheritance diagram for FPrimitiveSceneProxy:Classes | |
| struct | FDebugMassData |
Public Types | |
| enum class | EInstanceBufferAccessFlags { SynchronizeUpdateTask , UnsynchronizedAndUnsafe } |
| typedef TArray< class FLightCacheInterface *, TInlineAllocator< 8 > > | FLCIArray |
Static Public Member Functions | |
| static ENGINE_API void | DrawArc (FPrimitiveDrawInterface *PDI, const FVector &Start, const FVector &End, const float Height, const uint32 Segments, const FLinearColor &Color, uint8 DepthPriorityGroup, const float Thickness=0.0f, const bool bScreenSpace=false) |
| static ENGINE_API void | DrawArrowHead (FPrimitiveDrawInterface *PDI, const FVector &Tip, const FVector &Origin, const float Size, const FLinearColor &Color, uint8 DepthPriorityGroup, const float Thickness=0.0f, const bool bScreenSpace=false) |
Static Public Attributes | |
| static constexpr int32 | InvalidRayTracingGroupId = -1 |
Friends | |
| class | FScene |
| class | FLightPrimitiveInteraction |
| class | FMaterialCacheSceneExtensionUpdater |
Encapsulates the data which is mirrored to render a UPrimitiveComponent parallel to the game thread. This is intended to be subclassed to support different primitive types.
Get the list of LCIs. Used to set the precomputed lighting uniform buffers, which can only be created by the RENDERER_API.
|
strong |
| FPrimitiveSceneProxy::FPrimitiveSceneProxy | ( | const UPrimitiveComponent * | InComponent, |
| FName | ResourceName = NAME_None |
||
| ) |
Initialization constructor.
| FPrimitiveSceneProxy::FPrimitiveSceneProxy | ( | const FPrimitiveSceneProxyDesc & | InDesc, |
| FName | ResourceName = NAME_None |
||
| ) |
|
default |
Copy constructor.
|
virtual |
Virtual destructor.
|
inlinevirtual |
Gives the primitive the results of sub-occlusion-queries
| View | - the view the occlusion results are for |
| Results | - visibility results, allocated from the scene allocator, so valid until the end of the frame |
| NumResults | - number of visibility bools |
Reimplemented in FHierarchicalStaticMeshSceneProxy.
|
inline |
|
inline |
|
inline |
|
inline |
Reimplemented in FHierarchicalStaticMeshSceneProxy, FStaticMeshSceneProxy, and FGeometryCollectionSceneProxy.
|
inline |
Returns true if this proxy should write velocity even when the transform isn't changing. Usually this is combined with a check for the transform changing.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Applies a "late in the frame" adjustment to the proxy's existing transform
| LateUpdateTransform | - The post-transform to be applied to the LocalToWorld matrix |
|
inlinevirtual |
Gives the primitive an opportunity to override MeshBatch arguments for a specific View Only called for a MeshBatch with a bViewDependentArguments property set
| View | - the view to override for |
| ViewDependentMeshBatch | - view dependent mesh copy (does not affect a cached FMeshBatch) |
Reimplemented in FLandscapeComponentSceneProxy.
|
virtual |
Shifts primitive position and all relevant data by an arbitrary delta. Called on world origin changes
| InOffset | - The delta to shift by |
Reimplemented in FHierarchicalStaticMeshSceneProxy.
| void FPrimitiveSceneProxy::BuildUniformShaderParameters | ( | FPrimitiveUniformShaderParametersBuilder & | Builder | ) | const |
Apply the unform shader parameter settings for the proxy to the builder.
Reimplemented in Nanite::FSceneProxy, Nanite::FSkinnedSceneProxy, FSkeletalMeshSceneProxy, and FStaticMeshSceneProxy.
Reimplemented in FMaterialSpriteSceneProxy, FTextRenderSceneProxy, FModelSceneProxy, Nanite::FSceneProxyBase, FParticleSystemSceneProxy, FSkeletalMeshSceneProxy, FStaticMeshSceneProxy, FDynamicMeshSceneProxy, FGizmoArrowComponentSceneProxy, FGizmoBoxComponentSceneProxy, FGizmoCircleComponentSceneProxy, FGizmoLineHandleComponentSceneProxy, FGizmoRectangleComponentSceneProxy, ViewAdjustedStaticMeshGizmoComponentLocals::FViewAdjustedStaticMeshGizmoComponentProxy, FLandscapeComponentSceneProxy, and FWidget3DSceneProxy.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Creates the hit proxies are used when DrawDynamicElements is called. Called in the game thread.
| OutHitProxies | - Hit proxes which are created should be added to this array. |
Reimplemented in FInstancedStaticMeshSceneProxy.
|
virtual |
All FPrimitiveSceneProxy derived classes can decide to fully override the HHitProxy creation, or add their own and call any of their base classes to add theirs.
Classes deriving from FPrimitiveSceneProxy which are meant to be used with IPrimitiveComponent should override both CreateHitProxies(UPrimitiveComponent*, ...) and CreateHitProxies(IPrimitiveComponent*, ...) and make the UPrimitiveComponent version call into the IPrimitiveComponent one. This allows their derived classes that are exclusive to UPrimitiveComponent to call into them and to reroute the proxy creation to the IPrimitiveComponent path. Creates the hit proxies are used when DrawDynamicElements is called. Called in the game thread.
| OutHitProxies | - Hit proxes which are created should be added to this array. |
Reimplemented in FModelSceneProxy, and FInstancedStaticMeshSceneProxy.
|
inlinevirtual |
Called when the rendering thread adds the proxy to the scene. This function allows for generating renderer-side resources. Called in the rendering thread.
Reimplemented in FInstancedStaticMeshSceneProxy, FBrushSceneProxy, FVectorFieldSceneProxy, FHierarchicalStaticMeshSceneProxy, Nanite::FSceneProxy, Nanite::FSkinnedSceneProxy, FParticleSystemSceneProxy, FSkeletalMeshSceneProxy, FStaticMeshSceneProxy, FGeometryCollectionSceneProxy, FNaniteGeometryCollectionSceneProxy, FLandscapeMeshProxySceneProxy, FLandscapeComponentSceneProxy, and FSparseVolumeTextureViewerSceneProxy.
Called when the rendering thread removes the proxy from the scene. This function allows for removing renderer-side resources. Called in the rendering thread.
Reimplemented in FInstancedStaticMeshSceneProxy, Nanite::FSkinnedSceneProxy, FSkeletalMeshSceneProxy, FStaticMeshSceneProxy, FGeometryCollectionSceneProxy, FNaniteGeometryCollectionSceneProxy, FLandscapeMeshProxySceneProxy, FLandscapeComponentSceneProxy, and FSparseVolumeTextureViewerSceneProxy.
|
inline |
Returns true to inform scene update that the mesh batches produced makes use of the (GPU)Scene instance count, and thus don't require recaching if the instance count changed. Defaults to false, the proxy should only opt in if the above condition is true (or risk GPU-crashes). Requires FMeshBatchElement::bFetchInstanceCountFromScene to be true.
|
inline |
|
static |
Drawing helper. Draws nice bouncy line.
|
static |
Returns true if a primitive should currently be hidden because it is drawn only to the runtime virtual texture. The result can depend on the current scene state.
|
inlinevirtual |
Draws the primitive's static elements. This is called from the rendering thread once when the scene proxy is created. The static elements will only be rendered if GetViewRelevance declares static relevance.
| PDI | - The interface which receives the primitive elements. |
Reimplemented in FTextRenderSceneProxy, FModelSceneProxy, FHierarchicalStaticMeshSceneProxy, Nanite::FSceneProxy, Nanite::FSkinnedSceneProxy, FSkeletalMeshSceneProxy, FStaticMeshSceneProxy, FNaniteGeometryCollectionSceneProxy, FGameplayDebuggerCompositeSceneProxy, FBaseDynamicMeshSceneProxy, ViewAdjustedStaticMeshGizmoComponentLocals::FViewAdjustedStaticMeshGizmoComponentProxy, and FLandscapeComponentSceneProxy.
|
inline |
Returns true if this proxy can write velocity. This is used for setting velocity relevance.
|
protected |
Call during setup to set flags to indicate GPU-Scene support for the proxy if GPU-Scene is enabled & supported for the current feature level.
|
inline |
|
inlinevirtual |
Callback from the renderer to gather simple lights that this proxy wants renderered.
Reimplemented in FParticleSystemSceneProxy.
|
inline |
|
inline |
return < 0.0f to indicate no cutoff, 0.0f to use the global default and any value > 0.0f to indicate the relative screen space footprint size below which to stop animations.
Reimplemented in FNaniteInstancedSkinnedMeshSceneProxy, and FInstancedSkinnedMeshSceneProxy.
|
inline |
Reimplemented in Nanite::FSkinnedSceneProxy, FSkeletalMeshSceneProxy, FStaticMeshSceneProxy, and Nanite::FSceneProxyBase.
|
inline |
|
inlinevirtual |
Return the custom occlusion bounds for this scene proxy.
Reimplemented in FParticleSystemSceneProxy.
|
inline |
Get the custom primitive data for this scene proxy.
| ESceneDepthPriorityGroup FPrimitiveSceneProxy::GetDepthPriorityGroup | ( | const FSceneView * | View | ) | const |
Determines the DPG to render the primitive in for the given view. May be called regardless of the result of HasViewDependentDPG.
| View | - The view to determine the primitive's DPG for. |
|
inlinevirtual |
Reimplemented in Nanite::FSkinnedSceneProxy, FSkeletalMeshSceneProxy, and FStaticMeshSceneProxy.
|
inlinevirtual |
|
inlinefinalvirtual |
|
inline |
|
inlinevirtual |
Gathers the primitive's dynamic mesh elements. This will only be called if GetViewRelevance declares dynamic relevance. This is called from the rendering thread for each set of views that might be rendered.
Game thread state like UObjects must have their properties mirrored on the proxy to avoid race conditions. The rendering thread must not dereference UObjects. The gathered mesh elements will be used multiple times, any memory referenced must last as long as the Collector (eg no stack memory should be referenced). This function should not modify the proxy but simply collect a description of things to render. Updates to the proxy need to be pushed from game thread or external events.
| Views | - the array of views to consider. These may not exist in the ViewFamily. |
| ViewFamily | - the view family, for convenience |
| VisibilityMap | - a bit representing this proxy's visibility in the Views array |
| Collector | - gathers the mesh elements to be rendered and provides mechanisms for temporary allocations |
Reimplemented in FInstancedStaticMeshSceneProxy, FArrowSceneProxy, FSpriteSceneProxy, FBrushSceneProxy, FDrawFrustumSceneProxy, FHeterogeneousVolumeSceneProxy, FLineBatcherSceneProxy, FMaterialSpriteSceneProxy, FTextRenderSceneProxy, FModelSceneProxy, FVectorFieldSceneProxy, FDebugRenderSceneProxy, FHierarchicalStaticMeshSceneProxy, Nanite::FSceneProxy, Nanite::FSkinnedSceneProxy, FParticleSystemSceneProxy, FSkeletalMeshSceneProxy, FStaticMeshSceneProxy, FGeometryCollectionSceneProxy, FNaniteGeometryCollectionSceneProxy, FGameplayDebuggerCompositeSceneProxy, FBaseDynamicMeshSceneProxy, FGizmoArrowComponentSceneProxy, FGizmoBoxComponentSceneProxy, FGizmoCircleComponentSceneProxy, FGizmoLineHandleComponentSceneProxy, FGizmoRectangleComponentSceneProxy, ViewAdjustedStaticMeshGizmoComponentLocals::FViewAdjustedStaticMeshGizmoComponentProxy, FLandscapeGizmoRenderSceneProxy, FLandscapeComponentSceneProxy, FNavLinkRenderingProxy, FNavMeshSceneProxy, FSparseVolumeTextureViewerSceneProxy, and FWidget3DSceneProxy.
Returns the instance radius to use for per instance GPU LOD calculation. Returns 0.f if GPU LOD isn't enabled on the primitive.
Reimplemented in FInstancedStaticMeshSceneProxy.
|
inlinevirtual |
Reimplemented in FLandscapeComponentSceneProxy.
|
inline |
| FInstanceDataBufferHeader FPrimitiveSceneProxy::GetInstanceDataHeader | ( | ) | const |
|
inlinevirtual |
Return a pointer to a class that can be used to guard access to instance data that is being updated by a task. The proxy must guarantee the lifetime of this object, and, since it is being used on the render thread be careful about how it is updated. In general, it must always be updated on the RT if it is visible to the RT.
Reimplemented in FInstancedStaticMeshSceneProxy, FNaniteInstancedSkinnedMeshSceneProxy, FInstancedSkinnedMeshSceneProxy, and Nanite::FSceneProxy.
|
inlinevirtual |
Retrieves the instance draw distance range (mostly only used by objects whose instances are culled on the GPU)
| OutDistanceMinMax | contains the min/max camera distance of the primitive's instances when enabled |
Reimplemented in FNaniteInstancedSkinnedMeshSceneProxy, FInstancedSkinnedMeshSceneProxy, Nanite::FSceneProxy, FInstancedStaticMeshSceneProxy, and FHierarchicalStaticMeshSceneProxy.
| const FInstanceSceneDataBuffers * FPrimitiveSceneProxy::GetInstanceSceneDataBuffers | ( | EInstanceBufferAccessFlags | AccessFlags = EInstanceBufferAccessFlags::SynchronizeUpdateTask | ) | const |
Get the instance data view, which may be null for uninstanced primitives. The pointer must be kept valid for as long as the proxy lives, as a copy is cached in FPrimitiveSceneInfo.
|
inlinevirtual |
Retrieves the per-instance world position offset disable distance
| OutWPODisableDistance | contains the distance from the camera at which the primitive's instances disable WPO |
Reimplemented in Nanite::FSceneProxy, and FStaticMeshSceneProxy.
Reimplemented in FModelSceneProxy, Nanite::FSceneProxy, FStaticMeshSceneProxy, FNaniteGeometryCollectionSceneProxy, and FLandscapeComponentSceneProxy.
|
inline |
|
inline |
|
inline |
Get the lightmap UV coordinate index for this primitive. Used by systems that explicitly fetch lightmap UVs.
Reimplemented in Nanite::FSceneProxy, and FStaticMeshSceneProxy.
Get the lightmap resolution for this primitive. Used in VMI_LightmapDensity.
Reimplemented in FLandscapeComponentSceneProxy.
|
inline |
|
inlinevirtual |
Determines the relevance of this primitive's elements to the given light.
| LightSceneProxy | The light to determine relevance for |
| bDynamic | (output) The light is dynamic for this primitive |
| bRelevant | (output) The light is relevant for this primitive |
| bLightMapped | (output) The light is light mapped for this primitive |
Reimplemented in FInstancedStaticMeshSceneProxy, FModelSceneProxy, Nanite::FSceneProxy, FStaticMeshSceneProxy, FDynamicMeshSceneProxy, FLandscapeComponentSceneProxy, and FWidget3DSceneProxy.
|
inline |
|
inline |
|
inlinevirtual |
Returns the LOD that the primitive will render at for this view.
Reimplemented in FStaticMeshSceneProxy.
Returns a scale to apply to ScreenSize used in LOD calculation.
Reimplemented in FInstancedStaticMeshSceneProxy.
|
virtual |
Get the descriptor of the material cache, may be invalid if none allocated
|
inline |
|
inline |
Every derived class should override these functions
Implemented in FMaterialSpriteSceneProxy, FTextRenderSceneProxy, FVectorFieldSceneProxy, Nanite::FSceneProxy, Nanite::FSkinnedSceneProxy, FGeometryCollectionSceneProxy, FNaniteGeometryCollectionSceneProxy, FLandscapeComponentSceneProxy, FSparseVolumeTextureViewerSceneProxy, FArrowSceneProxy, FSpriteSceneProxy, FBrushSceneProxy, FDrawFrustumSceneProxy, FHeterogeneousVolumeSceneProxy, FLineBatcherSceneProxy, FModelSceneProxy, FDebugRenderSceneProxy, FParticleSystemSceneProxy, FSkeletalMeshSceneProxy, FStaticMeshSceneProxy, FFieldSystemSceneProxy, FGameplayDebuggerCompositeSceneProxy, FDynamicMeshSceneProxy, FGizmoArrowComponentSceneProxy, FGizmoBoxComponentSceneProxy, FGizmoCircleComponentSceneProxy, FGizmoLineHandleComponentSceneProxy, FGizmoRectangleComponentSceneProxy, FLandscapeGizmoRenderSceneProxy, FNavLinkRenderingProxy, FNavMeshSceneProxy, and FWidget3DSceneProxy.
|
inlinevirtual |
Reimplemented in Nanite::FSceneProxy, Nanite::FSkinnedSceneProxy, FSkeletalMeshSceneProxy, FStaticMeshSceneProxy, and FBaseDynamicMeshSceneProxy.
|
inlinevirtual |
Gathers a description of the mesh elements to be rendered for the given LOD index, without consideration for views.
Reimplemented in FStaticMeshSceneProxy.
|
inline |
|
inlinevirtual |
Reimplemented in Nanite::FSceneProxy, and FStaticMeshSceneProxy.
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in Nanite::FSceneProxyBase.
|
inlinevirtual |
Gets the boxes for sub occlusion queries
| View | - the view the occlusion results are for |
Reimplemented in FHierarchicalStaticMeshSceneProxy.
|
inline |
|
virtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Gathers shadow shapes from this proxy.
Reimplemented in FSkeletalMeshSceneProxy.
|
inlinevirtual |
Reimplemented in FSkeletalMeshSceneProxy, and Nanite::FSkinnedSceneProxy.
|
inlinevirtual |
Reimplemented in FLandscapeNaniteSceneProxy.
|
inlinevirtual |
Determines the DPG to render the primitive in regardless of view. Should only be called if HasViewDependentDPG()==true.
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in FStaticMeshSceneProxy, Nanite::FSceneProxyBase, and Nanite::FSceneProxy.
|
inline |
|
inline |
Return a type (or subtype) specific hash for sorting purposes
Implemented in FEQSSceneProxy, FInstancedStaticMeshSceneProxy, FArrowSceneProxy, FSpriteSceneProxy, FBrushSceneProxy, FDrawFrustumSceneProxy, FHeterogeneousVolumeSceneProxy, FLineBatcherSceneProxy, FMaterialSpriteSceneProxy, FTextRenderSceneProxy, FNaniteInstancedSkinnedMeshSceneProxy, FInstancedSkinnedMeshSceneProxy, FModelSceneProxy, FVectorFieldSceneProxy, FDebugRenderSceneProxy, FHierarchicalStaticMeshSceneProxy, Nanite::FSceneProxy, Nanite::FSkinnedSceneProxy, FParticleSystemSceneProxy, FSkeletalMeshSceneProxy, FSplineMeshSceneProxy, FNaniteSplineMeshSceneProxy, FStaticMeshSceneProxy, FFieldSystemSceneProxy, FGeometryCollectionSceneProxy, FNaniteGeometryCollectionSceneProxy, FGeometryCollectionISMPoolDebugDrawSceneProxy, FISMPoolDebugDrawSceneProxy, FInteractiveFoliageSceneProxy, FDynamicMeshSceneProxy, FGizmoArrowComponentSceneProxy, FGizmoBoxComponentSceneProxy, FGizmoCircleComponentSceneProxy, FGizmoLineHandleComponentSceneProxy, FGizmoRectangleComponentSceneProxy, FLandscapeGizmoRenderSceneProxy, FLandscapeMeshProxySceneProxy, FMRMeshProxy, FNavLinkRenderingProxy, FNavMeshSceneProxy, FSparseVolumeTextureViewerSceneProxy, and FWidget3DSceneProxy.
|
inline |
|
virtual |
Determines the relevance of this primitive's elements to the given view. Called in the rendering thread.
| View | - The view to determine relevance for. |
Reimplemented in FEQSSceneProxy, FInstancedStaticMeshSceneProxy, FArrowSceneProxy, FSpriteSceneProxy, FBrushSceneProxy, FDrawFrustumSceneProxy, FHeterogeneousVolumeSceneProxy, FLineBatcherSceneProxy, FMaterialSpriteSceneProxy, FTextRenderSceneProxy, FModelSceneProxy, FVectorFieldSceneProxy, FHierarchicalStaticMeshSceneProxy, Nanite::FSceneProxy, Nanite::FSkinnedSceneProxy, FParticleSystemSceneProxy, FSkeletalMeshSceneProxy, FStaticMeshSceneProxy, FGeometryCollectionSceneProxy, FNaniteGeometryCollectionSceneProxy, FGeometryCollectionISMPoolDebugDrawSceneProxy, FISMPoolDebugDrawSceneProxy, FGameplayDebuggerCompositeSceneProxy, FDynamicMeshSceneProxy, FGizmoArrowComponentSceneProxy, FGizmoBoxComponentSceneProxy, FGizmoCircleComponentSceneProxy, FGizmoLineHandleComponentSceneProxy, FGizmoRectangleComponentSceneProxy, ViewAdjustedStaticMeshGizmoComponentLocals::FViewAdjustedStaticMeshGizmoComponentProxy, FLandscapeGizmoRenderSceneProxy, FLandscapeComponentSceneProxy, FNavLinkRenderingProxy, FNavMeshSceneProxy, FSparseVolumeTextureViewerSceneProxy, and FWidget3DSceneProxy.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns whether the proxy utilizes custom occlusion bounds or not
Reimplemented in FParticleSystemSceneProxy.
|
inline |
Returns true if this proxy has any deformable mesh, meaning the mesh is animated e.g., by deforming the vertices through skinning, morphing or some procedural update. WPO and PDO are not considered here (as they are material effects).
Reimplemented in Nanite::FSceneProxy, and FStaticMeshSceneProxy.
|
inlinevirtual |
Reimplemented in FSkeletalMeshSceneProxy, and FStaticMeshSceneProxy.
|
inline |
Returns true if this proxy can change transform so that we should cache previous transform for calculating velocity.
|
inline |
|
inline |
|
inline |
Reimplemented in FHierarchicalStaticMeshSceneProxy.
|
inline |
|
inline |
Reimplemented in FLandscapeComponentSceneProxy.
|
inline |
|
inline |
Returns whether this proxy is always visible.
|
inline |
|
inline |
Reimplemented in Nanite::FSceneProxyBase, and FStaticMeshSceneProxy.
Returns whether this proxy should be considered a "detail mesh". Detail meshes are distance culled even if distance culling is normally disabled for the view. (e.g. in editor)
Reimplemented in FInstancedStaticMeshSceneProxy.
|
inline |
Tell us if this proxy is drawn in editor.
|
inline |
Tell us if this proxy is drawn in game.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns whether this proxy is a heterogeneous volume.
|
inline |
|
inline |
|
inline |
| bool FPrimitiveSceneProxy::IsInstanceDataGPUOnly | ( | ) | const |
Whether instance data only exists in the GPU Scene (instance data not present in CPU memory).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns whether this proxy is a Nanite mesh.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
Returns true if a primitive can never be rendered outside of a runtime virtual texture.
|
inline |
|
inline |
| bool FPrimitiveSceneProxy::IsShadowCast | ( | const FSceneView * | View | ) | const |
| bool FPrimitiveSceneProxy::IsShown | ( | const FSceneView * | View | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
Reimplemented in FTextRenderSceneProxy, Nanite::FSceneProxyBase, FSkeletalMeshSceneProxy, and FStaticMeshSceneProxy.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Called by the rendering thread to notify the proxy when a light is no longer associated with the proxy, so that it can clean up any cached resources.
| Light | - The light to be removed. |
|
inlineprotectedvirtual |
Allows child implementations to do render-thread work when bEvaluateWorldPositionOffset changes
Reimplemented in Nanite::FSceneProxy, and FStaticMeshSceneProxy.
Reimplemented in FLandscapeMeshProxySceneProxy, and FLandscapeComponentSceneProxy.
|
protected |
Called to notify the proxy that the level has been fully added to the world and the primitive will now be rendered. Only called if bShouldNotifyOnWorldAddRemove is set to true.
|
protected |
Called to notify the proxy that the level has been fully removed from the world and the primitive will not be rendered. Only called if bShouldNotifyOnWorldAddRemove is set to true.
|
inlinevirtual |
Called to notify the proxy when its transform has been updated. Called in the thread that owns the proxy; game or rendering.
Reimplemented in FArrowSceneProxy, FSpriteSceneProxy, FParticleSystemSceneProxy, FSkeletalMeshSceneProxy, FSplineMeshSceneProxy, FNaniteSplineMeshSceneProxy, FLandscapeComponentSceneProxy, and FWidget3DSceneProxy.
Allow subclasses to override the primitive name. Used primarily by BSP.
|
protected |
|
inline |
| void FPrimitiveSceneProxy::RenderBounds | ( | FPrimitiveDrawInterface * | PDI, |
| const FEngineShowFlags & | EngineShowFlags, | ||
| const FBoxSphereBounds & | Bounds, | ||
| bool | bRenderInEditor | ||
| ) | const |
Helper for components that want to render bounds.
| void FPrimitiveSceneProxy::ResetSceneVelocity_GameThread | ( | ) |
Enqueue and update for the render thread to remove the velocity data for this component from the scene.
Set whether the proxy can skip redundant transform updates where applicable.
Set the collision flag on the scene proxy to enable/disable collision drawing
| const | bool bNewEnabled new state for collision drawing |
Set the collision flag on the scene proxy to enable/disable collision drawing (RENDER THREAD)
| const | bool bNewEnabled new state for collision drawing |
Set the custom depth enabled flag
| the | new value |
Set the custom depth enabled flag (RENDER THREAD)
| the | new value |
| void FPrimitiveSceneProxy::SetCustomDepthStencilValue_GameThread | ( | const int32 | InCustomDepthStencilValue | ) |
Set the custom depth stencil value
| the | new value |
| void FPrimitiveSceneProxy::SetCustomDepthStencilValue_RenderThread | ( | const int32 | InCustomDepthStencilValue | ) |
Set the custom depth stencil value (RENDER THREAD)
| the | new value |
|
virtual |
Sets the primitive proxy's mass space to component space. Useful for debugging physics center of mass and inertia tensor
| void FPrimitiveSceneProxy::SetDrawDistance_RenderThread | ( | float | MinDrawDistance, |
| float | MaxDrawDistance, | ||
| float | VirtualTextureMaxDrawDistance | ||
| ) |
Set the drawn in game flag, from the render thread.
| bInDrawInGame | The new value. |
Set the draw in game flag (RENDER THREAD)
| the | new value |
Enqueue updated setting for evaluation of World Position Offset.
Updates the hidden editor view visibility map on the game thread which just enqueues a command on the render thread
Updates hover state for the primitive proxy. This simply sends a message to the rendering thread to call SetHovered_RenderThread. This is called in the game thread as hover state changes
| bInHovered | - true if the parent actor is hovered |
Updates hover state for the primitive proxy. This is called in the rendering thread by SetHovered_GameThread.
Updates hover state for the primitive proxy. This is called in the rendering thread by SetHovered_GameThread.
| bInHovered | - true if the parent actor is hovered |
Updates the LevelInstance editing state for the primitive proxy. This simply sends a message to the rendering thread to call SetLevelInstanceEditingState_RenderThread. This is called in the game thread when the object enters/leaves LevelInstance levels.
| bInEditingState | - true if the parent actor belongs to an editing LevelInstance sublevel |
|
protected |
Updates LevelInstance editing state for the primitive proxy. This is called in the rendering thread.
| void FPrimitiveSceneProxy::SetLightingChannels_GameThread | ( | FLightingChannels | LightingChannels | ) |
Updates the lighting channels for the primitive proxy.
|
inline |
| void FPrimitiveSceneProxy::SetPrimitiveColor_GameThread | ( | const FLinearColor & | InPrimitiveColor | ) |
Enqueue and update for the render thread to notify it that the primitive color changed.
| void FPrimitiveSceneProxy::SetSelection_GameThread | ( | const bool | bInParentSelected, |
| const bool | bInIndividuallySelected = false |
||
| ) |
Updates selection for the primitive proxy. This simply sends a message to the rendering thread to call SetSelection_RenderThread. This is called in the game thread as selection is toggled.
| bInParentSelected | - true if the parent actor is selected in the editor |
| bInIndividuallySelected | - true if the component is selected in the editor directly |
Updates selection for the primitive proxy. This simply sends a message to the rendering thread to call SetSelection_RenderThread. This is called in the game thread as selection is toggled.
| bInSelected | - true if the parent actor is selected in the editor |
|
protected |
Updates selection for the primitive proxy. This is called in the rendering thread by SetSelection_GameThread.
Updates selection for the primitive proxy. This is called in the rendering thread by SetSelection_GameThread.
| bInSelected | - true if the parent actor is selected in the editor |
|
protected |
|
inline |
|
inlinevirtual |
Reimplemented in Nanite::FSceneProxy.
|
inline |
|
inline |
| bool FPrimitiveSceneProxy::ShouldRenderCustomDepth | ( | ) | const |
|
inline |
|
inline |
|
inline |
Reimplemented in FModelSceneProxy.
|
inline |
|
inline |
Reimplemented in FStaticMeshSceneProxy.
|
inline |
|
inline |
Returns true if all meshes drawn by this proxy support GPU scene.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protectedvirtual |
Reimplemented in FInstancedStaticMeshSceneProxy.
|
finalprotectedvirtual |
Called on the render thread for a proxy that has an instance data update, the buffers are updated asynchronously so it is unclear what this should do, except update legacy data if needed.
| InBounds | - Primitive world space bounds. |
| InLocalBounds | - Primitive local space bounds. |
| InStaticMeshBounds | - Bounds of the primitive mesh instance. |
| void FPrimitiveSceneProxy::UpdateUniformBuffer | ( | FRHICommandList & | RHICmdList | ) |
Updates the primitive proxy's uniform buffer.
|
protected |
Updates bVisibleInLumen, which indicated whether a primitive should be tracked by Lumen scene. Checks if primitive can be ray traced and if it can by captured by surface cache.
| bool FPrimitiveSceneProxy::UseEditorCompositing | ( | const FSceneView * | View | ) | const |
| bool FPrimitiveSceneProxy::UseSingleSampleShadowFromStationaryLights | ( | ) | const |
| bool FPrimitiveSceneProxy::VerifyUsedMaterial | ( | const class FMaterialRenderProxy * | MaterialRenderProxy | ) | const |
Verifies that a material used for rendering was present in the component's GetUsedMaterials list.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
|
protected |
|
protected |
True if the primitive influences dynamic indirect lighting.
|
protected |
True if the primitive should affect indirect lighting even when hidden.
|
protected |
If this is True, this primitive doesn't need exact occlusion info.
|
protected |
Whether the primitive should always be considered to have velocities, even if it hasn't moved.
|
protected |
Whether the primitive has any materials that must ALWAYS evaluate World Position Offset.
|
protected |
Whether the primitive has any materials that must ALWAYS evaluate World Position Offset.
|
protected |
Whether the primitive has any materials with World Position Offset.
|
protected |
Whether the primitive has any materials that evaluate motion vector offset to modify velocity.
|
protected |
Whether the primitive has any materials that evaluate temporal Responsiveness.
|
protected |
Whether this component can skip redundant transform updates where applicable.
|
protected |
Whether the primitive should use capsules for direct shadowing, if present. Forces inset shadows.
|
protected |
Whether this component should create a per-object shadow that gives higher effective shadow resolution. Useful for cinematic character shadowing. Assumed to be enabled if bSelfShadowOnly is enabled.
|
protected |
Whether the object should cast a contact shadow
|
protected |
Whether the object should cast a deep shadow
|
protected |
True if the primitive casts dynamic shadows.
|
protected |
|
protected |
True if the primitive casts shadows even when hidden.
|
protected |
Whether this component should create a per-object shadow that gives higher effective shadow resolution. true if bSelfShadowOnly is true.
|
protected |
Whether the primitive should use an inset indirect shadow from capsules or mesh distance fields.
|
protected |
Whether this primitive should cast dynamic shadows as if it were a two sided material.
|
protected |
True if the primitive casts static shadows.
|
protected |
Whether the object should cast a volumetric translucent shadow. Volumetric translucent shadows are useful for primitives with smoothly changing opacity like particles representing a volume, But have artifacts when used on highly opaque surfaces.
|
protected |
Whether Lumen cards of this primitive can be shared.
|
protected |
Set to true to inform scene update that the MDCs produced may use the (GPU)Scene instance count, and thus don't require recaching if the instance count changed.
|
protected |
Whether the primitive will be used as an emissive light source.
|
protected |
Whether the primitive should evaluate any World Position Offset.
|
protected |
Whether this proxy's mesh is unlikely to be constantly changing.
|
protected |
True if the mesh representation is deformable (see HasDeformableMesh() above for more details). Defaults to true to be conservative.
|
protected |
True if the primitive wants to use static lighting, but has invalid content settings to do so.
|
protected |
Whether the primitive has any materials with World Position Offset, and some conditions around velocity are met.
|
protected |
If this is True, this primitive should render black with an alpha of 0, but all secondary effects (shadows, refletions, indirect lighting) should behave as usual. This feature requires activating the project setting(s) "Alpha Output", and "Support Primitive Alpha Holdout" if using the deferred renderer.
|
protected |
This is only set to true by constructors of proxy types which support gathering of UStreamableAssets
|
protected |
If this is True, this primitive is a skinned mesh
|
protected |
Whether this proxy is always visible.
|
protected |
If this is True, this primitive is to be rendered as a first person view object. Mutually exclusive with bIsFirstPersonWorldSpaceRepresentation.
|
protected |
If this is True, this primitive represents another first person primitive in world space. Mutually exclusive with bIsFirstPerson.
|
protected |
Whether this proxy is a heterogeneous volume.
|
protected |
Whether the primitive is a HierarchicalInstancedStaticMesh.
|
protected |
Whether the primitive is landscape grass.
|
protected |
Whether this is FLandscapeNaniteSceneProxy and implements GetSourceLandscapeComponentIds().
|
protected |
Whether this is a landscape proxy
|
protected |
Whether this proxy is a static mesh.
|
protected |
Whether to light this component and any attachments as a group. This only has effect on the root component of an attachment tree. When enabled, attached component shadowing settings like bCastInsetShadow, bCastVolumetricTranslucentShadow, etc, will be ignored. This is useful for improving performance when multiple movable components are attached together.
|
protected |
If true, a single top-down Lumen card is allocated
|
protected |
Whether the primitive should be statically lit but has unbuilt lighting, and a preview should be used.
|
protected |
Whether this component contains opaque materials (cached once from assigned material). Note: if composed from multiple meshes and materials, it may contain translucent materials.
|
protected |
When enabled, the component will only cast a shadow on itself and not other components in the world. This is especially useful for first person weapons, and forces bCastInsetShadow to be enabled.
|
protected |
Whether this primitive requires notification when its level is added to the world and made visible for the first time.
|
protected |
Whether to call GetDynamicMeshElements a single time, instead of once per unique FSceneViewFamily. If set to true, the GetDynamicMeshElements implementation must take into account that Views may point to different view families, with different EngineShowFlags. In practice, this means using View->Family in the loop over Views, especially for accessing EngineShowFlags, rather than the ViewFamily parameter passed in. The "AllViews" member, plus certain other members like the frame counter and time, are invariant across view families, and safe to access from ViewFamily. Example use cases are features that do global processing or initialize a common shared buffer across views, which are fairly rare.
|
protected |
Whether the whole component should be shadowed as one from stationary lights, which makes shadow receiving much cheaper. When enabled shadowing data comes from the volume lighting samples precomputed by Lightmass, which are very sparse. This is currently only used on stationary directional lights.
|
protected |
If this is True, this primitive is a skinned mesh
|
protected |
If this is True, this primitive is a spline mesh
|
protected |
Whether this proxy always uses UniformBuffer and no other uniform buffers.
When true, a fast path for updating can be used that does not update static draw lists.
|
protected |
Whether the primitive type supports a distance field representation. Does not mean the primitive has a valid representation.
|
protected |
True if all meshes (AKA all vertex factories) drawn by this proxy support GPU scene (default is false).
|
protected |
Whether the primitive implements GetHeightfieldRepresentation()
|
protected |
|
protected |
Whether the proxy supports asynchronously calling GetDynamicMeshElements. If disabled, all calls for various proxies are serialized with respect to each other.
|
protected |
Whether the proxy supports asynchronously calling GetDynamicRayTracingInstances. If disabled, all calls for various proxies are serialized with respect to each other.
|
protected |
This is only set true by the constructors of proxy types which support writing to runtime virtual texture.
|
protected |
Whether the object support triangles when rendered with translucent material
|
protected |
|
protected |
Whether this proxy ever draws with vertex factories that require a primitive uniform buffer. When false, updating the primitive uniform buffer can be skipped since vertex factories always use GPUScene instead.
|
protected |
|
protected |
False by default, if true the proxy wants editor-only effects like outlines and overlays.
|
protected |
true by default, if set to false will make given proxy never drawn with selection outline
|
protected |
Can be set to false to skip some work only needed on lit primitives.
|
protected |
Cached material relevance available for GetMaterialRelevance call.
| TArray<FDebugMassData> FPrimitiveSceneProxy::DebugMassData |
|
protected |
|
protected |
Min visibility for capsule shadows.
|
protected |
Quality of interpolated indirect lighting for Movable components.
| uint32 FPrimitiveSceneProxy::MaterialCacheDescriptor = UINT32_MAX |
Allocated cache descriptor
| TArray<class FMaterialCacheVirtualTextureRenderProxy*> FPrimitiveSceneProxy::MaterialCacheRenderProxies |
Allocated cache render proxies
|
protected |
The primitive's cull distance.
|
protected |
Maximum distance of World Position Offset used by materials. Values > 0.0 will cause the WPO to be clamped and the primitive's bounds to be padded to account for it. Value of zero will not clamp the WPO of materials nor pad bounds (legacy behavior)
|
protected |
The primitive's minimum cull distance.
|
protected |
|
protected |
Set of unique runtime virtual texture material types referenced by RuntimeVirtualTextures.
Array of runtime virtual textures unique ids that this proxy should render to.
|
protected |
| TSharedPtr<int32, ESPMode::ThreadSafe> FPrimitiveSceneProxy::SimpleStreamableAssetManagerIndex = MakeShared<int32, ESPMode::ThreadSafe>(INDEX_NONE) |
|
protected |
Number of low mips to skip when rendering to runtime virtual texture.
|
protected |
Geometry Lod bias when rendering to runtime virtual texture.
|
protected |
Log2 of minimum estimated pixel coverage before culling from runtime virtual texture.