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

#include <RuntimeVirtualTextureComponent.h>

+ Inheritance diagram for URuntimeVirtualTextureComponent:

Public Types

enum class  EStreamingTextureStatusFlags : uint8 {
  None = 0 , HasVirtualTexture = (1 << 0) , HasStreamingTexture = (1 << 1) , InvalidStreamingTexture = (1 << 2) ,
  NonMatchingStreamingTextureSettings = (1 << 3)
}
 

Public Member Functions

ENGINE_API void Invalidate (FBoxSphereBounds const &WorldBounds, EVTInvalidatePriority InvalidatePriority=EVTInvalidatePriority::High)
 
ENGINE_API void RequestPreload (FBoxSphereBounds const &WorldBounds, int32 Level)
 
ENGINE_API void SetVirtualTexture (URuntimeVirtualTexture *InVirtualTexture)
 
URuntimeVirtualTextureGetVirtualTexture () const
 
ENGINE_API bool IsEnabledInScene () const
 
ENGINE_API FVector4f GetCustomMaterialData () const
 
bool IsScalable () const
 
uint32 GetScalabilityGroup () const
 
FGetHidePrimitivesDelegateGetHidePrimitivesDelegate ()
 
ENGINE_API void GetHidePrimitiveSettings (bool &OutHidePrimitiveEditor, bool &OutHidePrimitiveGame) const
 
UVirtualTextureBuilderGetStreamingTexture () const
 
int32 NumStreamingMips () const
 
ENGINE_API bool IsStreamingLowMips (EShadingPath ShadingPath) const
 
ENGINE_API bool IsStreamingLowMipsOnly ()
 
ENGINE_API FLinearColor GetStreamingMipsFixedColor () const
 
TEnumAsByte< ETextureLossyCompressionAmountGetLossyCompressionAmount () const
 
ENGINE_API bool IsStreamingTextureInvalid (EShadingPath ShadingPath) const
 
ENGINE_API EVTProducerPriority GetPriority () const
 
ENGINE_API EStreamingTextureStatusFlags GetStreamingTextureStatus (EShadingPath ShadingPath) const
 
ENGINE_API FTransform GetTexelSnapTransform () const
 

Public Attributes

class FRuntimeVirtualTextureSceneProxySceneProxy
 

Protected Member Functions

 DECLARE_MULTICAST_DELEGATE_TwoParams (FGetHidePrimitivesDelegate, bool &, bool &)
 
virtual ENGINE_API void BeginDestroy () override
 
virtual ENGINE_API bool IsReadyForFinishDestroy () override
 
virtual ENGINE_API void Serialize (FArchive &Ar) override
 
virtual ENGINE_API void ApplyWorldOffset (const FVector &InOffset, bool bWorldShift) override
 
virtual ENGINE_API bool ShouldCreateRenderState () const override
 
virtual ENGINE_API void CreateRenderState_Concurrent (FRegisterComponentContext *Context) override
 
virtual ENGINE_API void SendRenderTransform_Concurrent () override
 
virtual ENGINE_API void DestroyRenderState_Concurrent () override
 
virtual ENGINE_API FBoxSphereBounds CalcBounds (const FTransform &LocalToWorld) const override
 
ENGINE_API uint64 CalculateStreamingTextureSettingsHash () const
 
ENGINE_API bool IsActiveInWorld () const
 

Protected Attributes

TSoftObjectPtr< AActorBoundsAlignActor = nullptr
 
bool bSetBoundsButton
 
bool bSnapBoundsToLandscape
 
float ExpandBounds = 0
 
TObjectPtr< URuntimeVirtualTextureVirtualTexture = nullptr
 
FPerPlatformBool EnableInGamePerPlatform
 
bool bEnableForNaniteOnly = false
 
bool bUseMinMaterialQuality = false
 
ERuntimeVirtualTextureMaterialQuality MinInGameMaterialQuality = ERuntimeVirtualTextureMaterialQuality::Low
 
bool bEnableScalability = false
 
uint32 ScalabilityGroup = 0
 
bool bHidePrimitives = false
 
TObjectPtr< UVirtualTextureBuilderStreamingTexture = nullptr
 
int32 StreamLowMips = 0
 
bool bBuildStreamingMipsButton
 
TEnumAsByte< ETextureLossyCompressionAmountLossyCompressionAmount = TLCA_Default
 
bool bUseStreamingMipsFixedColor = false
 
FLinearColor StreamingMipsFixedColor
 
bool bUseStreamingMipsOnly = false
 
ERuntimeVirtualTextureUseStreamingMipsInEditorMode UseStreamingMipsInEditorMode = ERuntimeVirtualTextureUseStreamingMipsInEditorMode::Never
 
bool bUseStreamingMipsInEditor_DEPRECATED = false
 
FGetHidePrimitivesDelegate HidePrimitivesDelegate
 
FRenderCommandFence DestroyFence
 

Friends

class FRuntimeVirtualTextureComponentDetailsCustomization
 

Detailed Description

Component used to place a URuntimeVirtualTexture in the world.

Member Enumeration Documentation

◆ EStreamingTextureStatusFlags

Enumerator
None 
HasVirtualTexture 
HasStreamingTexture 
InvalidStreamingTexture 
NonMatchingStreamingTextureSettings 

Member Function Documentation

◆ ApplyWorldOffset()

void URuntimeVirtualTextureComponent::ApplyWorldOffset ( const FVector InOffset,
bool  bWorldShift 
)
overrideprotectedvirtual

◆ BeginDestroy()

void URuntimeVirtualTextureComponent::BeginDestroy ( )
overrideprotectedvirtual

◆ CalcBounds()

FBoxSphereBounds URuntimeVirtualTextureComponent::CalcBounds ( const FTransform LocalToWorld) const
overrideprotectedvirtual

◆ CalculateStreamingTextureSettingsHash()

uint64 URuntimeVirtualTextureComponent::CalculateStreamingTextureSettingsHash ( ) const
protected

Calculate a hash used to determine if the StreamingTexture contents are valid for use. The hash doesn't include whether the contents are up to date.

◆ CreateRenderState_Concurrent()

void URuntimeVirtualTextureComponent::CreateRenderState_Concurrent ( FRegisterComponentContext Context)
overrideprotectedvirtual

◆ DECLARE_MULTICAST_DELEGATE_TwoParams()

URuntimeVirtualTextureComponent::DECLARE_MULTICAST_DELEGATE_TwoParams ( FGetHidePrimitivesDelegate  ,
bool ,
bool  
)
protected

Delegate that this virtual texture will call to evaluated the full HidePrimitives state.

◆ DestroyRenderState_Concurrent()

void URuntimeVirtualTextureComponent::DestroyRenderState_Concurrent ( )
overrideprotectedvirtual

◆ GetCustomMaterialData()

FVector4f URuntimeVirtualTextureComponent::GetCustomMaterialData ( ) const

Public getter for the custom material data on this component.

◆ GetHidePrimitivesDelegate()

FGetHidePrimitivesDelegate & URuntimeVirtualTextureComponent::GetHidePrimitivesDelegate ( )
inline

Get the delegate used to extend the calculation of the HidePrimitives state.

◆ GetHidePrimitiveSettings()

void URuntimeVirtualTextureComponent::GetHidePrimitiveSettings ( bool OutHidePrimitiveEditor,
bool OutHidePrimitiveGame 
) const

Get the full hide primitive state including the evaluating the GetHidePrimitivesDelegate delegate.

◆ GetLossyCompressionAmount()

TEnumAsByte< ETextureLossyCompressionAmount > URuntimeVirtualTextureComponent::GetLossyCompressionAmount ( ) const
inline

Public getter for lossy compression setting.

◆ GetPriority()

EVTProducerPriority URuntimeVirtualTextureComponent::GetPriority ( ) const

Public getter for priority setting.

◆ GetScalabilityGroup()

uint32 URuntimeVirtualTextureComponent::GetScalabilityGroup ( ) const
inline

Get group index of the scalability settings.

◆ GetStreamingMipsFixedColor()

ENGINE_API FLinearColor URuntimeVirtualTextureComponent::GetStreamingMipsFixedColor ( ) const

Public getter for streaming mips fixed color.

◆ GetStreamingTexture()

UVirtualTextureBuilder * URuntimeVirtualTextureComponent::GetStreamingTexture ( ) const
inline

Get the streaming virtual texture object on this component.

◆ GetStreamingTextureStatus()

URuntimeVirtualTextureComponent::EStreamingTextureStatusFlags URuntimeVirtualTextureComponent::GetStreamingTextureStatus ( EShadingPath  ShadingPath) const

Returns the status of the StreamingTexure contents for the specified shading path

◆ GetTexelSnapTransform()

FTransform URuntimeVirtualTextureComponent::GetTexelSnapTransform ( ) const

Get a translation to account for any vertex sample offset from the use of bSnapBoundsToLandscape.

◆ GetVirtualTexture()

URuntimeVirtualTexture * URuntimeVirtualTextureComponent::GetVirtualTexture ( ) const
inline

Get the runtime virtual texture object on this component.

◆ Invalidate()

void URuntimeVirtualTextureComponent::Invalidate ( FBoxSphereBounds const &  WorldBounds,
EVTInvalidatePriority  InvalidatePriority = EVTInvalidatePriority::High 
)

This function marks an area of the runtime virtual texture as dirty.

Parameters
WorldBounds: The world space bounds of the pages to invalidate.
InvalidatePriorityAllows the pages affected by this area to get processed in priority. This allows increased responsiveness when there are more pages being updated than can be handled in a given frame (throttling)

◆ IsActiveInWorld()

bool URuntimeVirtualTextureComponent::IsActiveInWorld ( ) const
protected
Returns
true if the owning World is one where URuntimeVirtualTextureComponent should actually do anything (avoids updating RVT for non-game/PIE/editor world types)

◆ IsEnabledInScene()

bool URuntimeVirtualTextureComponent::IsEnabledInScene ( ) const

Get if the runtime virtual texture should be fully instantiated by it's render proxy.

◆ IsReadyForFinishDestroy()

bool URuntimeVirtualTextureComponent::IsReadyForFinishDestroy ( )
overrideprotectedvirtual

◆ IsScalable()

bool URuntimeVirtualTextureComponent::IsScalable ( ) const
inline

Get if scalability settings are enabled.

◆ IsStreamingLowMips()

bool URuntimeVirtualTextureComponent::IsStreamingLowMips ( EShadingPath  ShadingPath) const

Get if we want to use any streaming low mips on this component.

◆ IsStreamingLowMipsOnly()

bool URuntimeVirtualTextureComponent::IsStreamingLowMipsOnly ( )

Public getter for using streaming low mips only.

◆ IsStreamingTextureInvalid()

bool URuntimeVirtualTextureComponent::IsStreamingTextureInvalid ( EShadingPath  ShadingPath) const

Returns whether the StreamingTexure contents is valid for use for the specified shading path

◆ NumStreamingMips()

int32 URuntimeVirtualTextureComponent::NumStreamingMips ( ) const
inline

Public getter for virtual texture streaming low mips

◆ RequestPreload()

void URuntimeVirtualTextureComponent::RequestPreload ( FBoxSphereBounds const &  WorldBounds,
int32  Level 
)

Request preload of an area of the runtime virtual texture at a given mip level.

Parameters
WorldBounds: The world space bounds of the pages to preload.
Level: The mip map level to preload.

◆ SendRenderTransform_Concurrent()

void URuntimeVirtualTextureComponent::SendRenderTransform_Concurrent ( )
overrideprotectedvirtual

◆ Serialize()

void URuntimeVirtualTextureComponent::Serialize ( FArchive Ar)
overrideprotectedvirtual

◆ SetVirtualTexture()

void URuntimeVirtualTextureComponent::SetVirtualTexture ( URuntimeVirtualTexture InVirtualTexture)

Set the runtime virtual texture object on this component.

◆ ShouldCreateRenderState()

bool URuntimeVirtualTextureComponent::ShouldCreateRenderState ( ) const
overrideprotectedvirtual

Friends And Related Symbol Documentation

◆ FRuntimeVirtualTextureComponentDetailsCustomization

friend class FRuntimeVirtualTextureComponentDetailsCustomization
friend

Member Data Documentation

◆ bBuildStreamingMipsButton

bool URuntimeVirtualTextureComponent::bBuildStreamingMipsButton
protected

Placeholder for details customization button.

◆ bEnableForNaniteOnly

bool URuntimeVirtualTextureComponent::bEnableForNaniteOnly = false
protected

Enable the virtual texture only when Nanite is enabled. Can be used for a Displacement virtual texture with Nanite tessellation.

◆ bEnableScalability

bool URuntimeVirtualTextureComponent::bEnableScalability = false
protected

Set to true to enable scalability settings for the virtual texture.

◆ bHidePrimitives

bool URuntimeVirtualTextureComponent::bHidePrimitives = false
protected

Hide primitives in the main pass. Hidden primitives will be those that draw to this virtual texture with 'Draw in Main Pass' set to 'From Virtual Texture'.

◆ BoundsAlignActor

TSoftObjectPtr<AActor> URuntimeVirtualTextureComponent::BoundsAlignActor = nullptr
protected

Actor to align rotation to. If set this actor is always included in the bounds calculation.

◆ bSetBoundsButton

bool URuntimeVirtualTextureComponent::bSetBoundsButton
protected

Placeholder for details customization button.

◆ bSnapBoundsToLandscape

bool URuntimeVirtualTextureComponent::bSnapBoundsToLandscape
protected

If the Bounds Align Actor is a Landscape then this will snap the bounds so that virtual texture texels align with landscape vertex positions.

◆ bUseMinMaterialQuality

bool URuntimeVirtualTextureComponent::bUseMinMaterialQuality = false
protected

Use a minimum material quality to determine if we enable the virtual texture.

◆ bUseStreamingMipsFixedColor

bool URuntimeVirtualTextureComponent::bUseStreamingMipsFixedColor = false
protected

Build the streaming low mips using a fixed color.

◆ bUseStreamingMipsInEditor_DEPRECATED

bool URuntimeVirtualTextureComponent::bUseStreamingMipsInEditor_DEPRECATED = false
protected

◆ bUseStreamingMipsOnly

bool URuntimeVirtualTextureComponent::bUseStreamingMipsOnly = false
protected

Whenever streaming low mips are in use, only show the streaming mips and never show runtime generated pages.

◆ DestroyFence

FRenderCommandFence URuntimeVirtualTextureComponent::DestroyFence
protected

A fence to track render thread has finished with StreamingTexture data before destroy.

◆ EnableInGamePerPlatform

FPerPlatformBool URuntimeVirtualTextureComponent::EnableInGamePerPlatform
protected

Per platform overrides for enabling the virtual texture. Only affects In-Game and PIE.

◆ ExpandBounds

float URuntimeVirtualTextureComponent::ExpandBounds = 0
protected

Amount to expand the Bounds during calculation.

◆ HidePrimitivesDelegate

FGetHidePrimitivesDelegate URuntimeVirtualTextureComponent::HidePrimitivesDelegate
protected

◆ LossyCompressionAmount

TEnumAsByte<ETextureLossyCompressionAmount> URuntimeVirtualTextureComponent::LossyCompressionAmount = TLCA_Default
protected

How aggressively should any relevant lossy compression be applied. For compressors that support EncodeSpeed (i.e. Oodle), this is only applied if enabled (see Project Settings -> Texture Encoding). Note that this is in addition to any unavoidable loss due to the target format. Selecting "No Lossy Compression" will not result in zero distortion for BCn formats.

◆ MinInGameMaterialQuality

ERuntimeVirtualTextureMaterialQuality URuntimeVirtualTextureComponent::MinInGameMaterialQuality = ERuntimeVirtualTextureMaterialQuality::Low
protected

The minimum material quality for which we enable the virtual texture. Only affects In-Game and PIE.

◆ ScalabilityGroup

uint32 URuntimeVirtualTextureComponent::ScalabilityGroup = 0
protected

Group index of the scalability settings to use for the virtual texture.

◆ SceneProxy

class FRuntimeVirtualTextureSceneProxy* URuntimeVirtualTextureComponent::SceneProxy

Scene proxy object. Managed by the scene but stored here.

◆ StreamingMipsFixedColor

FLinearColor URuntimeVirtualTextureComponent::StreamingMipsFixedColor
protected

Fixed color to use when building the streaming low mips. This only affects BaseColor and Displacement attributes. The Red channel is used for fixed Displacement.

◆ StreamingTexture

TObjectPtr<UVirtualTextureBuilder> URuntimeVirtualTextureComponent::StreamingTexture = nullptr
protected

Texture object containing streamed low mips. This can reduce rendering update cost.

◆ StreamLowMips

int32 URuntimeVirtualTextureComponent::StreamLowMips = 0
protected

Number of streaming low mips to build for the virtual texture.

◆ UseStreamingMipsInEditorMode

ERuntimeVirtualTextureUseStreamingMipsInEditorMode URuntimeVirtualTextureComponent::UseStreamingMipsInEditorMode = ERuntimeVirtualTextureUseStreamingMipsInEditorMode::Never
protected

Use streaming low mips when rendering this runtime virtual texture in the editor. Allows to visualize the baked streaming low mips. r.VT.RVT.StreamingMips.UseInEditor can also be used to allow this across all RVT components (for debugging purposes)

◆ VirtualTexture

TObjectPtr<URuntimeVirtualTexture> URuntimeVirtualTextureComponent::VirtualTexture = nullptr
protected

The virtual texture object to use.


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