UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IVirtualTexture Class Referenceabstract

#include <VirtualTexturing.h>

+ Inheritance diagram for IVirtualTexture:

Public Member Functions

 IVirtualTexture ()
 
virtual ~IVirtualTexture ()
 
virtual uint32 GetLocalMipBias (uint8 vLevel, uint32 vAddress) const
 
virtual bool IsPageStreamed (uint8 vLevel, uint32 vAddress) const =0
 
virtual FVTRequestPageResult RequestPageData (FRHICommandListBase &RHICmdList, const FVirtualTextureProducerHandle &ProducerHandle, uint8 LayerMask, uint8 vLevel, uint64 vAddress, EVTRequestPagePriority Priority)=0
 
virtual IVirtualTextureFinalizerProducePageData (FRHICommandListBase &RHICmdList, ERHIFeatureLevel::Type FeatureLevel, EVTProducePageFlags Flags, const FVirtualTextureProducerHandle &ProducerHandle, uint8 LayerMask, uint8 vLevel, uint64 vAddress, uint64 RequestHandle, const FVTProduceTargetLayer *TargetLayers)=0
 
virtual void GatherProducePageDataTasks (FVirtualTextureProducerHandle const &ProducerHandle, FGraphEventArray &InOutTasks) const
 
virtual void GatherProducePageDataTasks (uint64 RequestHandle, FGraphEventArray &InOutTasks) const
 
virtual void DumpToConsole (bool verbose)
 
virtual void OnRequestsCompleted ()
 

Detailed Description

This is the interface that can produce tiles of virtual texture data This can be extended to represent different ways of generating VT, such as disk streaming, runtime compositing, or whatever It's provided to the renderer module

Constructor & Destructor Documentation

◆ IVirtualTexture()

IVirtualTexture::IVirtualTexture ( )
inline

◆ ~IVirtualTexture()

virtual IVirtualTexture::~IVirtualTexture ( )
inlinevirtual

Member Function Documentation

◆ DumpToConsole()

virtual void IVirtualTexture::DumpToConsole ( bool  verbose)
inlinevirtual

Dump any type specific debug info.

Reimplemented in FUploadingVirtualTexture.

◆ GatherProducePageDataTasks() [1/2]

virtual void IVirtualTexture::GatherProducePageDataTasks ( FVirtualTextureProducerHandle const &  ProducerHandle,
FGraphEventArray InOutTasks 
) const
inlinevirtual

Collect all task graph events.

Reimplemented in FUploadingVirtualTexture, FVirtualTextureLevelRedirector, and FVirtualTextureAddressRedirect.

◆ GatherProducePageDataTasks() [2/2]

virtual void IVirtualTexture::GatherProducePageDataTasks ( uint64  RequestHandle,
FGraphEventArray InOutTasks 
) const
inlinevirtual

Collect all task graph events related to a request.

Reimplemented in FUploadingVirtualTexture, FVirtualTextureLevelRedirector, and FVirtualTextureAddressRedirect.

◆ GetLocalMipBias()

virtual uint32 IVirtualTexture::GetLocalMipBias ( uint8  vLevel,
uint32  vAddress 
) const
inlinevirtual

Gives a localized mip bias for the given local vAddress. This is used to implement sparse VTs, the bias is number of mip levels to add to reach a resident page Must be thread-safe, may be called from any thread

Parameters
vLevelThe mipmap level to check
vAddressVirtual address to check
Returns
Mip bias to be added to vLevel to reach a resident page at the given address

Reimplemented in FUploadingVirtualTexture.

◆ IsPageStreamed()

virtual bool IVirtualTexture::IsPageStreamed ( uint8  vLevel,
uint32  vAddress 
) const
pure virtual

◆ OnRequestsCompleted()

virtual void IVirtualTexture::OnRequestsCompleted ( )
inlinevirtual

Called on every virtual texture system update once all requests are completed, if bNotifyCompleted is enabled.

◆ ProducePageData()

virtual IVirtualTextureFinalizer * IVirtualTexture::ProducePageData ( FRHICommandListBase RHICmdList,
ERHIFeatureLevel::Type  FeatureLevel,
EVTProducePageFlags  Flags,
const FVirtualTextureProducerHandle ProducerHandle,
uint8  LayerMask,
uint8  vLevel,
uint64  vAddress,
uint64  RequestHandle,
const FVTProduceTargetLayer TargetLayers 
)
pure virtual

Upload page data to the cache, data must have been previously requested, and reported either 'Available' or 'Pending' The system will attempt to call RequestPageData/ProducePageData only once for a given vLevel/vAddress, with all the requested layers set in LayerMask, this is important for certain types of procedural producers that may generate multiple layers of VT data at the same time It's valid to produce 'Pending' page data, but in this case ProducePageData may block until data is ready Only called from render thread

Parameters
RHICmdListUsed to write any commands required to generate the VT page data
FeatureLevelThe current RHI feature level
ProducerHandleHandle to this producer
LayerMaskMask of requested layers; can be used to only produce data for these layers as an optimization, or ignored if all layers are logically produced together
vLevelThe mipmap level of the data
vAddressBit-interleaved x,y page indexes
RequestHandleopaque handle returned from 'RequestPageData'
TargetLayersArray of 'FVTProduceTargetLayer' structs, gives location where each layer should write data
Returns
a 'IVirtualTextureFinalizer' which must be finalized to complete the operation

Implemented in FTextureCollectionVirtualRedirector, FUploadingVirtualTexture, FVirtualTextureAdapterProducer, FVirtualTextureLevelRedirector, FMaterialCacheVirtualProducer, FVirtualTextureAddressRedirect, and FRuntimeVirtualTextureProducer.

◆ RequestPageData()

virtual FVTRequestPageResult IVirtualTexture::RequestPageData ( FRHICommandListBase RHICmdList,
const FVirtualTextureProducerHandle ProducerHandle,
uint8  LayerMask,
uint8  vLevel,
uint64  vAddress,
EVTRequestPagePriority  Priority 
)
pure virtual

Makes a request for the given page data. For data sources that can generate data immediately, it's reasonable for this method to do nothing, and simply return 'Available' Only called from render thread

Parameters
ProducerHandleHandle to this producer, can be used as a UID for this producer for any internal caching mechanisms
LayerMaskMask of requested layers
vLevelThe mipmap level of the data
vAddressBit-interleaved x,y page indexes
PriorityPriority of the request, used to drive async IO/task priority needed to generate data for request
Returns
FVTRequestPageResult describing the availability of the request

Implemented in FTextureCollectionVirtualRedirector, FUploadingVirtualTexture, FVirtualTextureAdapterProducer, FVirtualTextureLevelRedirector, FMaterialCacheVirtualProducer, FVirtualTextureAddressRedirect, and FRuntimeVirtualTextureProducer.


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