![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "SceneManagement.h"#include "DeviceProfiles/DeviceProfile.h"#include "DeviceProfiles/DeviceProfileManager.h"#include "EngineModule.h"#include "MaterialShared.h"#include "PrimitiveSceneProxy.h"#include "StaticMeshResources.h"#include "RHIStaticStates.h"#include "SceneView.h"#include "Async/ParallelFor.h"#include "LightMap.h"#include "LightSceneProxy.h"#include "ShadowMap.h"#include "RayTracingInstance.h"#include "Materials/MaterialRenderProxy.h"#include "TextureResource.h"#include "VT/LightmapVirtualTexture.h"#include "UnrealEngine.h"#include "ColorManagement/ColorSpace.h"#include "DataDrivenShaderPlatformInfo.h"#include "StaticMeshBatch.h"#include "PrimitiveUniformShaderParametersBuilder.h"#include "PrimitiveSceneShaderData.h"#include "RenderGraphBuilder.h"| bool AreCompressedTransformsSupported | ( | ) |
| float ComputeBoundsDrawDistance | ( | const float | ScreenSize, |
| const float | SphereRadius, | ||
| const FMatrix & | ProjMatrix | ||
| ) |
Computes the draw distance of a given sphere bounds in the given view with the specified screen size.
| ScreenSize | - The screen size (as computed by ComputeBoundsScreenSize) |
| SphereRadius | - Radius of the sphere to use to calculate screen coverage |
| ProjMatrix | - The projection matrix used to scale screen size bounds |
| float ComputeBoundsScreenRadiusSquared | ( | const FVector4 & | BoundsOrigin, |
| const float | SphereRadius, | ||
| const FVector4 & | ViewOrigin, | ||
| const FMatrix & | ProjMatrix | ||
| ) |
Computes the screen radius squared of a given sphere bounds in the given view. This is used at runtime instead of ComputeBoundsScreenSize to avoid a square root.
| Origin | - Origin of the bounds in world space |
| SphereRadius | - Radius of the sphere to use to calculate screen coverage |
| ViewOrigin | - The view origin involved in the calculation |
| ProjMatrix | - The projection matrix of the view involved in the calculation |
| float ComputeBoundsScreenRadiusSquared | ( | const FVector4 & | Origin, |
| const float | SphereRadius, | ||
| const FSceneView & | View | ||
| ) |
Computes the screen radius squared of a given sphere bounds in the given view. This is used at runtime instead of ComputeBoundsScreenSize to avoid a square root. It is a wrapper for the version below that does not take a FSceneView reference but parameters directly
| Origin | - Origin of the bounds in world space |
| SphereRadius | - Radius of the sphere to use to calculate screen coverage |
| View | - The view to calculate the display factor for |
| float ComputeBoundsScreenSize | ( | const FVector4 & | BoundsOrigin, |
| const float | SphereRadius, | ||
| const FVector4 & | ViewOrigin, | ||
| const FMatrix & | ProjMatrix | ||
| ) |
Computes the screen size of a given sphere bounds in the given view. The screen size is the projected diameter of the bounding sphere of the model. i.e. 0.5 means half the screen's maximum dimension.
| BoundsOrigin | - Origin of the bounds in world space |
| SphereRadius | - Radius of the sphere to use to calculate screen coverage |
| ViewOrigin | - The origin of the view to calculate the display factor for |
| ProjMatrix | - The projection matrix used to scale screen size bounds |
| float ComputeBoundsScreenSize | ( | const FVector4 & | Origin, |
| const float | SphereRadius, | ||
| const FSceneView & | View | ||
| ) |
Computes the screen size of a given sphere bounds in the given view. The screen size is the projected diameter of the bounding sphere of the model. i.e. 0.5 means half the screen's maximum dimension.
| Origin | - Origin of the bounds in world space |
| SphereRadius | - Radius of the sphere to use to calculate screen coverage |
| View | - The view to calculate the display factor for |
| FLODMask ComputeLODForMeshes | ( | const TArray< class FStaticMeshBatchRelevance > & | StaticMeshRelevances, |
| const FSceneView & | View, | ||
| const FVector4 & | Origin, | ||
| float | SphereRadius, | ||
| float | InstanceSphereRadius, | ||
| int32 | ForcedLODLevel, | ||
| float & | OutScreenRadiusSquared, | ||
| int8 | CurFirstLODIdx, | ||
| float | ScreenSizeScale = 1.0f |
||
| ) |
Computes the LOD to render for the list of static meshes in the given view.
| StaticMeshes | - List of static meshes. |
| View | - The view to render the LOD level for |
| Origin | - Origin of the bounds of the primitive in world space |
| SphereRadius | - Radius of the sphere bounds of the primitive in world space |
| InstanceSphereRadius | - Radius of the sphere bounds for a single mesh instance in the primitive. If not 0.f then the return FLODMask will contain a range of LODs ready for LOD selection on the GPU |
| FLODMask ComputeLODForMeshes | ( | const TArray< class FStaticMeshBatchRelevance > & | StaticMeshRelevances, |
| const FSceneView & | View, | ||
| const FVector4 & | Origin, | ||
| float | SphereRadius, | ||
| int32 | ForcedLODLevel, | ||
| float & | OutScreenRadiusSquared, | ||
| int8 | CurFirstLODIdx, | ||
| float | ScreenSizeScale = 1.0f, |
||
| bool | bDitheredLODTransition = true |
||
| ) |
Computes the LOD to render for the list of static meshes in the given view.
| StaticMeshes | - List of static meshes. |
| View | - The view to render the LOD level for |
| Origin | - Origin of the bounds of the primitive in world space |
| SphereRadius | - Radius of the sphere bounds of the primitive in world space |
| int8 ComputeStaticMeshLOD | ( | const FStaticMeshRenderData * | RenderData, |
| const FVector4 & | Origin, | ||
| const float | SphereRadius, | ||
| const FSceneView & | View, | ||
| int32 | MinLOD, | ||
| float | FactorScale = 1.0f |
||
| ) |
Computes the LOD level for the given static meshes render data in the given view.
| RenderData | - Render data for the mesh |
| Origin | - Origin of the bounds of the mesh in world space |
| SphereRadius | - Radius of the sphere to use to calculate screen coverage |
| View | - The view to calculate the LOD level for |
| FactorScale | - multiplied by the computed screen size before computing LOD |
| float ComputeTemporalLODBoundsScreenSize | ( | const FVector & | Origin, |
| const float | SphereRadius, | ||
| const FSceneView & | View, | ||
| int32 | SampleIndex | ||
| ) |
| int8 ComputeTemporalStaticMeshLOD | ( | const FStaticMeshRenderData * | RenderData, |
| const FVector4 & | Origin, | ||
| const float | SphereRadius, | ||
| const FSceneView & | View, | ||
| int32 | MinLOD, | ||
| float | FactorScale, | ||
| int32 | SampleIndex | ||
| ) |
Computes the LOD level for the given static meshes render data in the given view, for one of the two temporal LOD samples
| RenderData | - Render data for the mesh |
| Origin | - Origin of the bounds of the mesh in world space |
| SphereRadius | - Radius of the sphere to use to calculate screen coverage |
| View | - The view to calculate the LOD level for |
| FactorScale | - multiplied by the computed screen size before computing LOD |
| SampleIndex | - index (0 or 1) of the temporal sample to use |
| bool DoesPlatformSupportDistanceFieldAO | ( | EShaderPlatform | Platform | ) |
| bool DoesPlatformSupportDistanceFields | ( | const FStaticShaderPlatform | Platform | ) |
| bool DoesPlatformSupportDistanceFieldShadowing | ( | EShaderPlatform | Platform | ) |
| bool DoesProjectSupportDistanceFields | ( | ) |
| void GetLightmapClusterResourceParameters | ( | ERHIFeatureLevel::Type | FeatureLevel, |
| const FLightmapClusterResourceInput & | Input, | ||
| const IAllocatedVirtualTexture * | AllocatedVT, | ||
| FLightmapResourceClusterShaderParameters & | Parameters | ||
| ) |
| const FSceneView & GetLODView | ( | const FSceneView & | InView | ) |
Will return the view to use taking into account VR which has 2 views
| IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT | ( | FLightmapResourceClusterShaderParameters | , |
| "LightmapResourceCluster" | |||
| ) |
| IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT | ( | FMobileReflectionCaptureShaderParameters | , |
| "MobileReflectionCapture" | |||
| ) |
| IMPLEMENT_STATIC_UNIFORM_BUFFER_SLOT | ( | WorkingColorSpace | ) |
| IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT | ( | FWorkingColorSpaceShaderParameters | , |
| "WorkingColorSpace" | , | ||
| WorkingColorSpace | |||
| ) |
| void InitializeSharedSamplerStates | ( | ) |
Initializes the shared sampler states.
| bool ShouldAllPrimitivesHaveDistanceField | ( | EShaderPlatform | ShaderPlatform | ) |
| bool ShouldCompileDistanceFieldShaders | ( | EShaderPlatform | ShaderPlatform | ) |
| FSharedSamplerState* Clamp_WorldGroupSettings = NULL |
Sampler state using Clamp addressing and taking filter mode from the world texture group.
| TGlobalResource< FDefaultLightmapResourceClusterUniformBuffer > GDefaultLightmapResourceClusterUniformBuffer |
Global uniform buffer containing the default precomputed lighting data.
| TGlobalResource<FDefaultMobileReflectionCaptureUniformBuffer> GDefaultMobileReflectionCaptureUniformBuffer |
Global uniform buffer containing the default reflection data used in mobile renderer.
| TGlobalResource<FDefaultWorkingColorSpaceUniformBuffer> GDefaultWorkingColorSpaceUniformBuffer |
| FSharedSamplerState* Wrap_WorldGroupSettings = NULL |
Sampler state using Wrap addressing and taking filter mode from the world texture group.