UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FVariableRateShadingImageManager Class Reference

#include <VariableRateShadingImageManager.h>

+ Inheritance diagram for FVariableRateShadingImageManager:

Public Types

enum  EVRSPassType {
  BasePass , TranslucencyAll , NaniteEmitGBufferPass , SSAO ,
  SSR , ReflectionEnvironmentAndSky , LightFunctions , Decals ,
  Num
}
 
enum  EVRSImageType : uint32 { Disabled = 0 , Full = 1 , Conservative = 2 }
 
enum class  EVRSSourceType : uint32 {
  FixedFoveation = 0x1 , EyeTrackedFoveation = 0x2 , ContrastAdaptiveShading = 0x4 , All = FixedFoveation | EyeTrackedFoveation | ContrastAdaptiveShading ,
  XRFoveation = FixedFoveation | EyeTrackedFoveation , None = 0x0
}
 
- Public Types inherited from FRenderResource
enum class  EInitPhase : uint8 { Pre , Default , MAX }
 

Public Member Functions

 FVariableRateShadingImageManager ()
 
virtual ~FVariableRateShadingImageManager ()
 
virtual void InitRHI (FRHICommandListBase &RHICmdList) override
 
virtual void ReleaseRHI () override
 
FRDGTextureRef GetVariableRateShadingImage (FRDGBuilder &GraphBuilder, const FViewInfo &ViewInfo, EVRSPassType PassType, bool bRequestSoftwareImage=false)
 
void PrepareImageBasedVRS (FRDGBuilder &GraphBuilder, const FSceneViewFamily &ViewFamily, const FMinimalSceneTextures &SceneTextures)
 
bool IsTypeEnabledForView (const FSceneView &View, EVRSSourceType Type)
 
RENDERER_API void RegisterExternalImageGenerator (IVariableRateShadingImageGenerator *ExternalGenerator)
 
RENDERER_API void UnregisterExternalImageGenerator (IVariableRateShadingImageGenerator *ExternalGenerator)
 
RENDERER_API bool IsPipelineVRSEnabled () const
 
RENDERER_API bool IsAttachmentVRSEnabled () const
 
RENDERER_API bool IsVRSEnabledForFrame () const
 
RENDERER_API bool IsHardwareVRSEnabledForFrame () const
 
RENDERER_API bool IsSoftwareVRSEnabledForFrame () const
 
 UE_DEPRECATED (5.5, "IsHardwareVRSEnabled() is deprecated, please use IsHardwareVRSEnabledForFrame() instead.") bool IsHardwareVRSEnabled()
 
 UE_DEPRECATED (5.5, "IsSoftwareVRSEnabled() is deprecated, please use IsSoftwareVRSEnabledForFrame() instead.") bool IsSoftwareVRSEnabled()
 
bool GetNeedStaticMeshUpdate () const
 
void SetNeedStaticMeshUpdate (bool bInNeedStaticMeshUpdate)
 
void DrawDebugPreview (FRDGBuilder &GraphBuilder, const FSceneViewFamily &ViewFamily, FRDGTextureRef OutputSceneColor)
 
- Public Member Functions inherited from FRenderResource
RENDERCORE_API FRenderResource ()
 
RENDERCORE_API FRenderResource (ERHIFeatureLevel::Type InFeatureLevel)
 
RENDERCORE_API FRenderResource (const FRenderResource &)
 
RENDERCORE_API FRenderResource (FRenderResource &&)
 
RENDERCORE_API FRenderResourceoperator= (const FRenderResource &Other)
 
RENDERCORE_API FRenderResourceoperator= (FRenderResource &&Other)
 
virtual RENDERCORE_API ~FRenderResource ()
 
virtual RENDERCORE_API void InitResource (FRHICommandListBase &RHICmdList)
 
virtual RENDERCORE_API void ReleaseResource ()
 
RENDERCORE_API void UpdateRHI (FRHICommandListBase &RHICmdList)
 
virtual FString GetFriendlyName () const
 
bool IsInitialized () const
 
int32 GetListIndex () const
 
EInitPhase GetInitPhase () const
 
void SetOwnerName (FName InOwnerName)
 
FName GetOwnerName () const
 
void SetResourceName (FName InResourceName)
 
FName GetResourceName () const
 

Static Public Member Functions

static bool IsHardwareVRSSupported ()
 
static bool IsSoftwareVRSSupported ()
 
static bool IsVRSCompatibleWithView (const FViewInfo &View)
 
static bool IsVRSCompatibleWithOutputType (const EDisplayOutputFormat &DisplayOutputFormat)
 
static FIntPoint GetSRITileSize (bool bSoftwareSize=false)
 
static FRDGTextureDesc GetSRIDesc (const FSceneViewFamily &ViewFamily, bool bSoftwareSize=false)
 
static int32 GetNumberOfSupportedRates ()
 
- 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

- Public Attributes inherited from FRenderResource
ERenderResourceState ResourceState = ERenderResourceState::Default
 
- 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 FRHICommandListBaseGetImmediateCommandList ()
 

Member Enumeration Documentation

◆ EVRSImageType

Image type to request from generator. Only the CAS generator currently distinguishes between Full and Conservative

Enumerator
Disabled 
Full 
Conservative 

◆ EVRSPassType

Pass type used to determine requested image type based on current CVar settings.

Enumerator
BasePass 
TranslucencyAll 
NaniteEmitGBufferPass 
SSAO 
SSR 
ReflectionEnvironmentAndSky 
LightFunctions 
Decals 
Num 

◆ EVRSSourceType

Explicit VRS source flags; each type of VRS image generated here will have it's own flag defined in this bitfield. These flags can be used for any particular rendering path to exclude specific types of VRS generation; e.g. Used to allow exclusion of certain types when getting image.

Enumerator
FixedFoveation 

Fixed Foveation: Shading rate is decreased near the periphery of the viewport

EyeTrackedFoveation 

Eye-Tracked Foveation: Shading rate is decreased in the periphery of the user's gaze

ContrastAdaptiveShading 

Contrast Adaptive Shading: Shading rate is decreased in areas of low contrast (calculated based on the prior frame)

All 

Mask of all available VRS source types.

XRFoveation 

Mask of XR foveated VRS gen only.

None 

Constructor & Destructor Documentation

◆ FVariableRateShadingImageManager()

FVariableRateShadingImageManager::FVariableRateShadingImageManager ( )

Public functions

◆ ~FVariableRateShadingImageManager()

FVariableRateShadingImageManager::~FVariableRateShadingImageManager ( )
virtual

Member Function Documentation

◆ DrawDebugPreview()

void FVariableRateShadingImageManager::DrawDebugPreview ( FRDGBuilder GraphBuilder,
const FSceneViewFamily ViewFamily,
FRDGTextureRef  OutputSceneColor 
)

◆ GetNeedStaticMeshUpdate()

bool FVariableRateShadingImageManager::GetNeedStaticMeshUpdate ( ) const

◆ GetNumberOfSupportedRates()

int32 FVariableRateShadingImageManager::GetNumberOfSupportedRates ( )
static

◆ GetSRIDesc()

FRDGTextureDesc FVariableRateShadingImageManager::GetSRIDesc ( const FSceneViewFamily ViewFamily,
bool  bSoftwareSize = false 
)
static

◆ GetSRITileSize()

FIntPoint FVariableRateShadingImageManager::GetSRITileSize ( bool  bSoftwareSize = false)
static

◆ GetVariableRateShadingImage()

FRDGTextureRef FVariableRateShadingImageManager::GetVariableRateShadingImage ( FRDGBuilder GraphBuilder,
const FViewInfo ViewInfo,
FVariableRateShadingImageManager::EVRSPassType  PassType,
bool  bRequestSoftwareImage = false 
)

Get the combined VRS image for the specified view setup, target size/configuration, and application flags. May be run multiple times from different passes.

◆ InitRHI()

void FVariableRateShadingImageManager::InitRHI ( FRHICommandListBase RHICmdList)
overridevirtual

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.

◆ IsAttachmentVRSEnabled()

bool FVariableRateShadingImageManager::IsAttachmentVRSEnabled ( ) const

◆ IsHardwareVRSEnabledForFrame()

bool FVariableRateShadingImageManager::IsHardwareVRSEnabledForFrame ( ) const

◆ IsHardwareVRSSupported()

bool FVariableRateShadingImageManager::IsHardwareVRSSupported ( )
static

◆ IsPipelineVRSEnabled()

bool FVariableRateShadingImageManager::IsPipelineVRSEnabled ( ) const

◆ IsSoftwareVRSEnabledForFrame()

bool FVariableRateShadingImageManager::IsSoftwareVRSEnabledForFrame ( ) const

◆ IsSoftwareVRSSupported()

bool FVariableRateShadingImageManager::IsSoftwareVRSSupported ( )
static

◆ IsTypeEnabledForView()

bool FVariableRateShadingImageManager::IsTypeEnabledForView ( const FSceneView View,
FVariableRateShadingImageManager::EVRSSourceType  Type 
)

Returns true if any generator among the given types is enabled, false otherwise.

◆ IsVRSCompatibleWithOutputType()

bool FVariableRateShadingImageManager::IsVRSCompatibleWithOutputType ( const EDisplayOutputFormat DisplayOutputFormat)
static

◆ IsVRSCompatibleWithView()

bool FVariableRateShadingImageManager::IsVRSCompatibleWithView ( const FViewInfo View)
static

◆ IsVRSEnabledForFrame()

bool FVariableRateShadingImageManager::IsVRSEnabledForFrame ( ) const

◆ PrepareImageBasedVRS()

void FVariableRateShadingImageManager::PrepareImageBasedVRS ( FRDGBuilder GraphBuilder,
const FSceneViewFamily ViewFamily,
const FMinimalSceneTextures SceneTextures 
)

Prepare VRS images and store them for later access. Should be run exactly once in Render(), before attempting to get any VRS images for that frame.

◆ RegisterExternalImageGenerator()

void FVariableRateShadingImageManager::RegisterExternalImageGenerator ( IVariableRateShadingImageGenerator ExternalGenerator)

◆ ReleaseRHI()

void FVariableRateShadingImageManager::ReleaseRHI ( )
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.

◆ SetNeedStaticMeshUpdate()

void FVariableRateShadingImageManager::SetNeedStaticMeshUpdate ( bool  bInNeedStaticMeshUpdate)

◆ UE_DEPRECATED() [1/2]

FVariableRateShadingImageManager::UE_DEPRECATED ( 5.  5,
"IsHardwareVRSEnabled() is  deprecated,
please use IsHardwareVRSEnabledForFrame() instead."   
)
inline

◆ UE_DEPRECATED() [2/2]

FVariableRateShadingImageManager::UE_DEPRECATED ( 5.  5,
"IsSoftwareVRSEnabled() is  deprecated,
please use IsSoftwareVRSEnabledForFrame() instead."   
)
inline

◆ UnregisterExternalImageGenerator()

void FVariableRateShadingImageManager::UnregisterExternalImageGenerator ( IVariableRateShadingImageGenerator ExternalGenerator)

The documentation for this class was generated from the following files: