![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ScenePrivate.h>
Inheritance diagram for FSceneViewState:Classes | |
| struct | FOcclusion |
| class | FProjectedShadowKey |
Public Types | |
| typedef TMap< FSceneViewState::FProjectedShadowKey, FRHIPooledRenderQuery > | ShadowKeyOcclusionQueryMap |
Public Types inherited from FRenderResource | |
| enum class | EInitPhase : uint8 { Pre , Default , MAX } |
Static Public Member Functions | |
| static FPooledRenderTargetDesc | CreateLUTRenderTarget (const int32 LUTSize, const bool bUseVolumeLUT, const bool bNeedUAV, const bool bNeedFloatOutput) |
Static Public Member Functions inherited from FSceneViewStateInterface | |
| static ENGINE_API TPimplPtr< FSceneViewStateSystemMemoryMirror > | SystemMemoryMirrorAllocate () |
Static Public Member Functions inherited from FRenderResource | |
| static RENDERCORE_API void | ReleaseRHIForAllResources () |
| static RENDERCORE_API void | InitPreRHIResources () |
| static RENDERCORE_API void | ChangeFeatureLevel (ERHIFeatureLevel::Type NewFeatureLevel) |
| static RENDERCORE_API FName | SetScopeName (FName Name) |
Additional Inherited Members | |
Protected Member Functions inherited from FSceneViewStateInterface | |
| virtual | ~FSceneViewStateInterface () |
Protected Member Functions inherited from FRenderResource | |
| void | SetFeatureLevel (const FStaticFeatureLevel InFeatureLevel) |
| const FStaticFeatureLevel | GetFeatureLevel () const |
| bool | HasValidFeatureLevel () const |
| template<typename T > | |
| FBufferRHIRef | CreateRHIBuffer (FRHICommandListBase &RHICmdList, T &InOutResourceObject, uint32 ResourceCount, EBufferUsageFlags InBufferUsageFlags, const TCHAR *InDebugName) |
| void | SetInitPhase (EInitPhase InInitPhase) |
Static Protected Member Functions inherited from FRenderResource | |
| static RENDERCORE_API FRHICommandListBase & | GetImmediateCommandList () |
Protected Attributes inherited from FSceneViewStateInterface | |
| uint8 | bValidEyeAdaptationBuffer: 1 |
The scene manager's private implementation of persistent view state. This class is associated with a particular camera across multiple frames by the game thread. The game thread calls FRendererModule::AllocateViewState to create an instance of this private implementation.
| typedef TMap<FSceneViewState::FProjectedShadowKey, FRHIPooledRenderQuery> FSceneViewState::ShadowKeyOcclusionQueryMap |
| FSceneViewState::FSceneViewState | ( | ERHIFeatureLevel::Type | FeatureLevel, |
| FSceneViewState * | ShareOriginTarget | ||
| ) |
Default constructor.
|
inlineoverridevirtual |
If frozen view matrices are available, set those as active on the SceneView
Implements FSceneViewStateInterface.
|
overridevirtual |
Similar to above, but adds Lumen Scene Data
Reimplemented from FSceneViewStateInterface.
|
inlineoverridevirtual |
Implements FSceneViewStateInterface.
|
inlineoverridevirtual |
Clears the pool of mids being referenced by this view state
Implements FSceneViewStateInterface.
|
inlinestatic |
|
overridevirtual |
Called in the game thread to destroy the view state.
Implements FSceneViewStateInterface.
|
inline |
|
inlineoverridevirtual |
Implements FSceneViewStateInterface.
|
inlinefinaloverridevirtual |
Returns the eye adaptation buffer.
Implements FSceneViewStateInterface.
|
inline |
Implements FSceneViewStateInterface.
|
inlinevirtual |
returns the distance field temporal sample index
Implements FSceneViewStateInterface.
|
inline |
|
inline |
|
inlineoverridevirtual |
If frozen view matrices are available, return a pointer to them
Implements FSceneViewStateInterface.
|
inline |
|
inlinevirtual |
Returns the average scene luminance.
Implements FSceneViewStateInterface.
|
inlinevirtual |
Returns the eye adaptation exposure.
Implements FSceneViewStateInterface.
|
inlinevirtual |
returns the occlusion frame counter
Implements FSceneViewStateInterface.
|
inline |
Returns the current PreExposure value. PreExposure is a custom scale applied to the scene color to prevent buffer overflow.
Implements FSceneViewStateInterface.
|
inlineoverridevirtual |
Allows MIDs being created and released during view rendering without the overhead of creating and releasing objects As MID are not allowed to be parent of MID this gets fixed up by parenting it to the next Material or MIC
| InSource | can be Material, MIC or MID, must not be 0 |
Implements FSceneViewStateInterface.
|
inlineoverridevirtual |
Implements FSceneViewStateInterface.
|
inline |
|
overridevirtual |
Reimplemented from FSceneViewStateInterface.
|
inline |
|
inlineoverridevirtual |
Implements FSceneViewStateInterface.
|
inlineoverridevirtual |
Returns the temporal LOD struct from the viewstate
Implements FSceneViewStateInterface.
|
inlineoverridevirtual |
Returns the blend factor between the last two LOD samples
Implements FSceneViewStateInterface.
|
inline |
|
inline |
|
inlineoverridevirtual |
returns a unique key for the view state, non-zero
Implements FSceneViewStateInterface.
|
inlineoverridevirtual |
Implements FSceneViewStateInterface.
Implements FSceneViewStateInterface.
Implements FSceneViewStateInterface.
|
overridevirtual |
Implements FSceneViewStateInterface.
|
inline |
|
inlineoverridevirtual |
Initializes the RHI resources used by this resource. Called when entering the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.
Reimplemented from FRenderResource.
|
inline |
| bool FSceneViewState::IsShadowOccluded | ( | FSceneViewState::FProjectedShadowKey | ShadowKey, |
| int32 | NumBufferedFrames | ||
| ) | const |
Checks whether a shadow is occluded this frame.
| Primitive | - The shadow subject. |
| Light | - The shadow source. |
|
inlineoverridevirtual |
Resets pool for GetReusableMID()
Implements FSceneViewStateInterface.
|
overridevirtual |
Releases the RHI resources used by this resource. Called when leaving the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.
Reimplemented from FRenderResource.
|
overridevirtual |
Reimplemented from FSceneViewStateInterface.
Implements FSceneViewStateInterface.
| const uint8 * FSceneViewState::ResolvePrecomputedVisibilityData | ( | FViewInfo & | View, |
| const FScene * | InScene | ||
| ) |
Returns an array of visibility data for the given view, or NULL if none exists. The data bits are indexed by VisibilityId of each primitive in the scene. This method decompresses data if necessary and caches it based on the bucket and chunk index in the view state. InScene is passed in, as the Scene pointer in the class itself may be null, if it was allocated without a scene.
Returns an array of visibility data for the given view position, or NULL if none exists. The data bits are indexed by VisibilityId of each primitive in the scene. This method decompresses data if necessary and caches it based on the bucket and chunk index in the view state. InScene is passed in, as the Scene pointer in the class itself may be null, if it was allocated without a scene.
|
inlineoverridevirtual |
If frozen view matrices were set, restore the previous view matrices
Implements FSceneViewStateInterface.
|
overridevirtual |
Reimplemented from FSceneViewStateInterface.
|
inlineoverridevirtual |
Implements FSceneViewStateInterface.
|
inline |
|
inline |
|
finaloverridevirtual |
Implements FSceneViewStateInterface.
|
finaloverridevirtual |
Implements FSceneViewStateInterface.
| void FSceneViewState::TrimOcclusionHistory | ( | float | CurrentTime, |
| float | MinHistoryTime, | ||
| float | MinQueryTime, | ||
| int32 | FrameNumber | ||
| ) |
Cleans out old entries from the primitive occlusion history, and resets unused pending occlusion queries.
| MinHistoryTime | - The occlusion history for any primitives which have been visible and unoccluded since this time will be kept. The occlusion history for any primitives which haven't been visible and unoccluded since this time will be discarded. |
| MinQueryTime | - The pending occlusion queries older than this will be discarded. |
| void FSceneViewState::UpdateExposureCompensationCurveLUT | ( | FRHICommandList & | RHICmdList, |
| UCurveFloat * | Curve | ||
| ) |
|
inline |
|
inline |
Calculates and stores the scale factor to apply to motion vectors based on the current game time and view post process settings.
Called every frame after UpdateLastRenderTime, sets up the information for the lagged temporal LOD transition
| TRDGUniformBufferRef<FAdaptiveVolumetricShadowMapUniformBufferParameters> FSceneViewState::AdaptiveVolumetricCameraMapUniformBuffer = nullptr |
| FAdaptiveVolumetricShadowMapUniformBufferParameters* FSceneViewState::AdaptiveVolumetricCameraMapUniformBufferParameters = nullptr |
| TMap<int32, TRDGUniformBufferRef<FAdaptiveVolumetricShadowMapUniformBufferParameters> > FSceneViewState::AdaptiveVolumetricShadowMapUniformBufferMap |
| TMap<int32, TRDGUniformBufferRef<FBeerShadowMapUniformBufferParameters> > FSceneViewState::BeerShadowMapUniformBufferMap |
| uint32 FSceneViewState::bIsFreezing |
Are we currently in the state of freezing rendering? (1 frame where we gather what was rendered)
| uint32 FSceneViewState::bIsFrozen |
Is rendering currently frozen?
| uint32 FSceneViewState::bIsFrozenViewMatricesCached |
True if the CachedViewMatrices is holding frozen view matrices, otherwise false
| struct { ... } FSceneViewState::BloomFFTKernel |
| bool FSceneViewState::bLumenSceneDataAdded |
| bool FSceneViewState::bUpdateLastExposure |
Whether to get the last exposure from GPU
| FViewMatrices FSceneViewState::CachedViewMatrices |
The cache view matrices at the time of freezing or the cached debug fly cam's view matrices.
| int32 FSceneViewState::CachedVisibilityBucketIndex |
Cached visibility data from the last call to ResolvePrecomputedVisibilityData.
| int32 FSceneViewState::CachedVisibilityChunkIndex |
| int32 FSceneViewState::CachedVisibilityHandlerId |
| TRefCountPtr<FRDGPooledBuffer> FSceneViewState::ConstantsBuffer |
| UCurveFloat* FSceneViewState::Curve = nullptr |
Storage to which compressed visibility chunks are uncompressed at runtime.
| TPimplPtr<DiaphragmDOF::FDOFViewState> FSceneViewState::DepthOfFieldState |
| TRefCountPtr<IPooledRenderTarget> FSceneViewState::DistanceFieldAOHistoryRT |
| FIntRect FSceneViewState::DistanceFieldAOHistoryViewRect |
| TRefCountPtr<IPooledRenderTarget> FSceneViewState::DistanceFieldIrradianceHistoryRT |
| struct { ... } FSceneViewState::FilmGrainCache |
| TUniquePtr<FForwardLightingViewResources> FSceneViewState::ForwardLightingResources |
| uint32 FSceneViewState::FrameIndex |
| TSet<FPrimitiveComponentId> FSceneViewState::FrozenPrimitives |
The set of primitives that were rendered the frame that we froze rendering
| TRDGUniformBufferRef<FFrustumVoxelGridUniformBufferParameters> FSceneViewState::FrustumVoxelGridUniformBuffer = nullptr |
| FGlintShadingLUTsStateData FSceneViewState::GlintShadingLUTsData |
| TRefCountPtr<FPersistentGlobalDistanceFieldData> FSceneViewState::GlobalDistanceFieldData |
Potentially shared to save memory in cases where multiple view states share a common origin, such as cube map capture faces.
| FHairStrandsViewStateData FSceneViewState::HairStrandsViewStateData |
| TMap<FPrimitiveComponentId, FHLODSceneNodeVisibilityState> FSceneViewState::HLODSceneNodeVisibilityStates |
| FHLODVisibilityState FSceneViewState::HLODVisibilityState |
HLOD persistent fading and visibility state
| FHZBOcclusionTester FSceneViewState::HZBOcclusionTests |
| FIntPoint FSceneViewState::ImageSize |
| float FSceneViewState::LandscapeCachedMipBias |
| FSamplerStateRHIRef FSceneViewState::LandscapeWeightmapSamplerCache |
| double FSceneViewState::LastRenderTime |
| TRefCountPtr<IPooledRenderTarget> FSceneViewState::LightScatteringHistory |
| float FSceneViewState::LightScatteringHistoryPreExposure |
| TMap<const ULightComponent*, TUniquePtr<FTemporalAAHistory> > FSceneViewState::LightShaftBloomHistoryRTs |
| FTemporalAAHistory FSceneViewState::LightShaftOcclusionHistory |
| FLumenViewState FSceneViewState::Lumen |
| float FSceneViewState::LumenSurfaceCacheResolution |
| FSamplerStateRHIRef FSceneViewState::MaterialTextureBilinearClampedSamplerCache |
| FSamplerStateRHIRef FSceneViewState::MaterialTextureBilinearWrapedSamplerCache |
| float FSceneViewState::MaterialTextureCachedMipBias |
| FMegaLightsViewState FSceneViewState::MegaLights |
| float FSceneViewState::MotionBlurTargetDeltaTime |
| float FSceneViewState::MotionBlurTimeScale |
| struct FSceneViewState::FOcclusion FSceneViewState::Occlusion |
| FOcclusionFeedback FSceneViewState::OcclusionFeedback |
| uint32 FSceneViewState::OcclusionFrameCounter |
| FRenderQueryPoolRHIRef FSceneViewState::OcclusionQueryPool |
The view's occlusion query pool.
| TRDGUniformBufferRef<FOrthoVoxelGridUniformBufferParameters> FSceneViewState::OrthoVoxelGridUniformBuffer = nullptr |
| uint32 FSceneViewState::OutputFrameIndex |
| uint32 FSceneViewState::PendingPrevFrameNumber |
| FPersistentSkyAtmosphereData FSceneViewState::PersistentSkyAtmosphereData |
| uint32 FSceneViewState::PhysicalMipLevel |
| FRHITexture* FSceneViewState::PhysicalRHI = nullptr |
| TMap<int32, FIndividualOcclusionHistory> FSceneViewState::PlanarReflectionOcclusionHistories |
| float FSceneViewState::PreExposure |
The current frame PreExposure
| uint32 FSceneViewState::PrevFrameNumber |
| FPreviousViewInfo FSceneViewState::PrevFrameViewInfo |
Informations of to persist for the next frame's FViewInfo::PrevViewInfo.
Under normal use case (temporal histories are not frozen), this gets cleared after setting FViewInfo::PrevViewInfo after being copied to FViewInfo::PrevViewInfo. New temporal histories get directly written to it.
When temporal histories are frozen (pause command, or r.Test.FreezeTemporalHistories), this keeps it's values, and the currently rendering FViewInfo should not update it. Refer to FViewInfo::bStatePrevViewInfoIsReadOnly.
| TRefCountPtr<IPooledRenderTarget> FSceneViewState::PrevLightScatteringConservativeDepthTexture |
| FVector2f FSceneViewState::PrevLightScatteringViewGridUVToViewRectVolumeUV |
| FMatrix44f FSceneViewState::PrevViewMatrixForOcclusionQuery |
| FVector FSceneViewState::PrevViewOriginForOcclusionQuery |
| FPrimitiveFadingStateMap FSceneViewState::PrimitiveFadingStates |
For this view, the set of primitives that are currently fading, either in or out.
| FFrameBasedOcclusionQueryPool FSceneViewState::PrimitiveOcclusionQueryPool |
| float FSceneViewState::Scale = 0.f |
| FScene* FSceneViewState::Scene |
The scene pointer may be NULL – it's filled in by certain API calls that require a FSceneViewState and FScene to know about each other, Whenever a ViewState and Scene get linked, this pointer is set, and a pointer to the ViewState is added to an array in the Scene. The linking is necessary in cases where incremental FScene updates need to be reflected in cached data stored in FSceneViewState.
| ESequencerState FSceneViewState::SequencerState |
| FShaderPrintStateData FSceneViewState::ShaderPrintStateData |
| TArray<ShadowKeyOcclusionQueryMap, TInlineAllocator<FOcclusionQueryHelpers::MaxBufferedOcclusionFrames> > FSceneViewState::ShadowOcclusionQueryMaps |
| uint32 FSceneViewState::ShareOriginUniqueID |
Cube map captures share an origin, allowing them to share things like global distance fields and Lumen scene data. Otherwise, this will just be the same as UniqueID.
| TMap<FSimpleLightId, int32> FSceneViewState::SimpleLightIdToForwardLightIndex |
| TRefCountPtr<IPooledRenderTarget> FSceneViewState::Spectral |
| FStochasticLightingViewState FSceneViewState::StochasticLighting |
| TRefCountPtr<IPooledRenderTarget> FSceneViewState::SubsurfaceScatteringQualityHistoryRT |
| int32 FSceneViewState::TemporalAASampleIndex |
| FTemporalLODState FSceneViewState::TemporalLODState |
| FTextureRHIRef FSceneViewState::Texture |
| FRHITexture* FSceneViewState::TextureRHI = nullptr |
| FTranslucencyLightingViewState FSceneViewState::TranslucencyLighting |
| uint32 FSceneViewState::UniqueID |
| FVolumetricRenderTargetViewStateData FSceneViewState::VolumetricCloudRenderTarget |
| FVector FSceneViewState::VolumetricCloudShadowmapPreviousAnchorPoint[NUM_ATMOSPHERE_LIGHTS] |
| FVector FSceneViewState::VolumetricCloudShadowmapPreviousAtmosphericLightDir[NUM_ATMOSPHERE_LIGHTS] |
| FVector FSceneViewState::VolumetricCloudShadowmapPreviousAtmosphericLightPos[NUM_ATMOSPHERE_LIGHTS] |
| FMatrix FSceneViewState::VolumetricCloudShadowmapPreviousTranslatedWorldToLightClipMatrix[NUM_ATMOSPHERE_LIGHTS] |
| FTemporalRenderTargetState FSceneViewState::VolumetricCloudShadowRenderTarget[NUM_ATMOSPHERE_LIGHTS] |
| FIntVector FSceneViewState::VolumetricFogPrevResourceGridSize |
| FVector2f FSceneViewState::VolumetricFogPrevUVMax |
| FVector2f FSceneViewState::VolumetricFogPrevUVMaxForTemporalBlend |
| FVector2f FSceneViewState::VolumetricFogPrevViewGridRectUVToResourceUV |