UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RuntimeVirtualTexture Namespace Reference

Classes

class  FAstcParametersUniformBuffer
 
class  FBatchRenderContext
 
class  FDynamicMeshCollector
 
class  FEtcParametersUniformBuffer
 
class  FMaterialPolicy_BaseColor
 
class  FMaterialPolicy_BaseColorNormalRoughness
 
class  FMaterialPolicy_BaseColorNormalSpecular
 
class  FMaterialPolicy_Displacement
 
class  FMaterialPolicy_Mask4
 
class  FMaterialPolicy_WorldHeight
 
struct  FRenderGraphSetup
 
struct  FRenderPageBatchDesc
 
struct  FRenderPageDesc
 
struct  FRenderPageTarget
 
class  FRuntimeVirtualTextureMeshProcessor
 
class  FShader_VirtualTextureCompress
 
class  FShader_VirtualTextureCompress_CS
 
class  FShader_VirtualTextureCopy
 
class  FShader_VirtualTextureCopy_PS
 
class  FShader_VirtualTextureCopy_VS
 
class  FShader_VirtualTextureMaterialDraw
 
class  FShader_VirtualTextureMaterialDraw_PS
 
class  FShader_VirtualTextureMaterialDraw_VS
 

Enumerations

enum  { MaxTextureLayers = 3 }
 
enum  { MaterialType_NumBits = 3 }
 
enum  { MaxRenderPageBatch = 8 }
 

Functions

ENGINE_API IVirtualTextureCreateStreamingTextureProducer (UVirtualTexture2D *InStreamingTexture, FVTProducerDescription const &InOwnerProducerDesc, FVTProducerDescription &OutStreamingProducerDesc)
 
ENGINE_API IVirtualTextureBindStreamingTextureProducer (IVirtualTexture *InProducer, IVirtualTexture *InStreamingProducer, int32 InTransitionLevel)
 
ENGINE_API bool IsMaterialTypeSupported (ERuntimeVirtualTextureMaterialType MaterialType)
 
ENGINE_API bool IsMaterialTypeSupported (ERuntimeVirtualTextureMaterialType MaterialType, EShaderPlatform InPlatform)
 
 IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT (FEtcParameters, "EtcParameters")
 
const TUniformBufferRef< FEtcParameters > & GetEtcParametersUniformBufferRef ()
 
 IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT (FAstcParameters, "AstcParameters")
 
const TUniformBufferRef< FAstcParameters > & GetAstcParametersUniformBufferRef ()
 
bool UseEtcProfile (EShaderPlatform ShaderPlatform)
 
bool UseAstcProfile (EShaderPlatform ShaderPlatform)
 
bool UseAstcHighProfile (EShaderPlatform ShaderPlatform)
 
bool UseRGBA16 (EShaderPlatform ShaderPlatform)
 
 IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT (FRuntimeVirtualTexturePassParameters, "RuntimeVirtualTexturePassParameters", DeferredDecals)
 
 IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE (FMaterialPolicy_BaseColor, BaseColor)
 
 IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE (FMaterialPolicy_BaseColorNormalRoughness, BaseColorNormalRoughness)
 
 IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE (FMaterialPolicy_BaseColorNormalSpecular, BaseColorNormalSpecular)
 
 IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE (FMaterialPolicy_Mask4, Mask4)
 
 IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE (FMaterialPolicy_WorldHeight, WorldHeight)
 
 IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE (FMaterialPolicy_Displacement, Displacement)
 
FMeshPassProcessorCreateRuntimeVirtualTexturePassProcessor (ERHIFeatureLevel::Type FeatureLevel, const FScene *Scene, const FSceneView *InViewIfDynamicMeshCommand, FMeshPassDrawListContext *InDrawListContext)
 
 REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR (VirtualTexturePass, CreateRuntimeVirtualTexturePassProcessor, EShadingPath::Deferred, EMeshPass::VirtualTexture, EMeshPassFlags::CachedMeshCommands)
 
 REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR (VirtualTexturePassMobile, CreateRuntimeVirtualTexturePassProcessor, EShadingPath::Mobile, EMeshPass::VirtualTexture, EMeshPassFlags::CachedMeshCommands)
 
void GatherMeshesToDraw (FDynamicPassMeshDrawListContext *DynamicMeshPassContext, FRDGBuilder &GraphBuilder, FScene *Scene, FViewInfo *View, ERuntimeVirtualTextureMaterialType MaterialType, int32 RuntimeVirtualTextureId, uint8 vLevel, uint8 MaxLevel, bool bAllowCachedMeshDrawCommands)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::BaseColor >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CompressBaseColorCS"), SF_Compute)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CompressBaseColorNormalSpecularCS"), SF_Compute)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Roughness >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CompressBaseColorNormalRoughnessCS"), SF_Compute)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular_YCoCg >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CompressBaseColorNormalSpecularYCoCgCS"), SF_Compute)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular_Mask_YCoCg >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CompressBaseColorNormalSpecularMaskYCoCgCS"), SF_Compute)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::Mask4 >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CompressMask4CS"), SF_Compute)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::Displacement >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CompressDisplacementCS"), SF_Compute)
 
template<ERuntimeVirtualTextureMaterialType MaterialType>
void AddCompressPass (FRDGBuilder &GraphBuilder, ERHIFeatureLevel::Type FeatureLevel, FShader_VirtualTextureCompress::FParameters *Parameters, FIntVector GroupCount, bool bDirectAliasing)
 
void AddCompressPass (FRDGBuilder &GraphBuilder, ERHIFeatureLevel::Type FeatureLevel, FShader_VirtualTextureCompress::FParameters *Parameters, FIntPoint TextureSize, int32 NumSlices, ERuntimeVirtualTextureMaterialType MaterialType, bool bDirectAliasing)
 
 IMPLEMENT_SHADER_TYPE (, FShader_VirtualTextureCopy_VS, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CopyVS"), SF_Vertex)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::BaseColor >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CopyBaseColorPS"), SF_Pixel)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CopyBaseColorNormalSpecularPS"), SF_Pixel)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular_YCoCg >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CopyBaseColorNormalSpecularYCoCgPS"), SF_Pixel)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular_Mask_YCoCg >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CopyBaseColorNormalSpecularMaskYCoCgPS"), SF_Pixel)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::Mask4 >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CopyMask4PS"), SF_Pixel)
 
 IMPLEMENT_SHADER_TYPE (template<>, FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::WorldHeight >, TEXT("/Engine/Private/VirtualTextureCompress.usf"), TEXT("CopyWorldHeightPS"), SF_Pixel)
 
template<ERuntimeVirtualTextureMaterialType MaterialType>
void AddCopyPass (FRDGBuilder &GraphBuilder, ERHIFeatureLevel::Type FeatureLevel, FShader_VirtualTextureCopy::FParameters *Parameters, FIntPoint TextureSize)
 
void AddCopyPass (FRDGBuilder &GraphBuilder, ERHIFeatureLevel::Type FeatureLevel, FShader_VirtualTextureCopy::FParameters *Parameters, FIntPoint TextureSize, ERuntimeVirtualTextureMaterialType MaterialType)
 
void AddCopyThumbnailPass (FRDGBuilder &GraphBuilder, ERHIFeatureLevel::Type FeatureLevel, FShader_VirtualTextureCopy::FParameters *Parameters, FIntPoint TextureSize, ERuntimeVirtualTextureMaterialType MaterialType)
 
void MeshPassPrologue (FRHICommandList &RHICmdList, FIntRect const &InViewRect, int32 InPageIndex, EShaderPlatform InShaderPlatform)
 
FLinearColor GetDebugMipLevelColor (bool bInAllowMipDebug, uint32 InLevel, uint32 InTileAndBorderSize)
 
void RenderPage (FRDGBuilder &GraphBuilder, FBatchRenderContext const &BatchRenderContext, int32 PageIndex)
 
void CopyPage (FRDGBuilder &GraphBuilder, FBatchRenderContext const &BatchRenderContext, int32 PageIndex)
 
void CompressPages (FRDGBuilder &GraphBuilder, FBatchRenderContext const &BatchRenderContext)
 
void CopyPagesToOutput (FRDGBuilder &GraphBuilder, FBatchRenderContext const &BatchRenderContext)
 
bool IsSceneReadyToRender (FSceneInterface *Scene)
 
FBatchRenderContext const * InitPageBatch (FRDGBuilder &GraphBuilder, FRenderPageBatchDesc const &InDesc)
 
void RenderPageBatch (FRDGBuilder &GraphBuilder, FBatchRenderContext const &InContext)
 
void FinalizePageBatch (FRDGBuilder &GraphBuilder, FBatchRenderContext const &InContext)
 
void RenderPages (FRDGBuilder &GraphBuilder, FRenderPageBatchDesc const &InDesc)
 
uint32 GetRuntimeVirtualTextureSceneIndex_GameThread (URuntimeVirtualTextureComponent *InComponent)
 
void RenderPagesStandAlone (FRDGBuilder &GraphBuilder, FRenderPageBatchDesc const &InDesc)
 

Variables

int32 RenderCaptureNextRVTPagesDraws = 0
 

Detailed Description

Maximum number of texture layers we will have in a runtime virtual texture. Increase if we add a ERuntimeVirtualTextureMaterialType with more layers.

Enumeration Type Documentation

◆ anonymous enum

Enumerator
MaxTextureLayers 

◆ anonymous enum

Enumerator
MaterialType_NumBits 

◆ anonymous enum

Enum for our maximum RenderPages() batch size.

Enumerator
MaxRenderPageBatch 

Function Documentation

◆ AddCompressPass() [1/2]

void RuntimeVirtualTexture::AddCompressPass ( FRDGBuilder GraphBuilder,
ERHIFeatureLevel::Type  FeatureLevel,
FShader_VirtualTextureCompress::FParameters *  Parameters,
FIntPoint  TextureSize,
int32  NumSlices,
ERuntimeVirtualTextureMaterialType  MaterialType,
bool  bDirectAliasing 
)

Set up the BC compression pass for the given MaterialType.

◆ AddCompressPass() [2/2]

template<ERuntimeVirtualTextureMaterialType MaterialType>
void RuntimeVirtualTexture::AddCompressPass ( FRDGBuilder GraphBuilder,
ERHIFeatureLevel::Type  FeatureLevel,
FShader_VirtualTextureCompress::FParameters *  Parameters,
FIntVector  GroupCount,
bool  bDirectAliasing 
)

Add the BC compression pass to the graph.

◆ AddCopyPass() [1/2]

template<ERuntimeVirtualTextureMaterialType MaterialType>
void RuntimeVirtualTexture::AddCopyPass ( FRDGBuilder GraphBuilder,
ERHIFeatureLevel::Type  FeatureLevel,
FShader_VirtualTextureCopy::FParameters *  Parameters,
FIntPoint  TextureSize 
)

Add the copy pass to the graph.

◆ AddCopyPass() [2/2]

void RuntimeVirtualTexture::AddCopyPass ( FRDGBuilder GraphBuilder,
ERHIFeatureLevel::Type  FeatureLevel,
FShader_VirtualTextureCopy::FParameters *  Parameters,
FIntPoint  TextureSize,
ERuntimeVirtualTextureMaterialType  MaterialType 
)

Set up the copy pass for the given MaterialType.

◆ AddCopyThumbnailPass()

void RuntimeVirtualTexture::AddCopyThumbnailPass ( FRDGBuilder GraphBuilder,
ERHIFeatureLevel::Type  FeatureLevel,
FShader_VirtualTextureCopy::FParameters *  Parameters,
FIntPoint  TextureSize,
ERuntimeVirtualTextureMaterialType  MaterialType 
)

Set up the copy pass for the given MaterialType.

◆ BindStreamingTextureProducer()

IVirtualTexture * RuntimeVirtualTexture::BindStreamingTextureProducer ( IVirtualTexture InProducer,
IVirtualTexture InStreamingProducer,
int32  InTransitionLevel 
)

Helper function to bind a runtime virtual texture producer to a streaming producer. Returns the new combined producer.

◆ CompressPages()

void RuntimeVirtualTexture::CompressPages ( FRDGBuilder GraphBuilder,
FBatchRenderContext const &  BatchRenderContext 
)

Compress all pages in a batch.

◆ CopyPage()

void RuntimeVirtualTexture::CopyPage ( FRDGBuilder GraphBuilder,
FBatchRenderContext const &  BatchRenderContext,
int32  PageIndex 
)

Copy a single rendered page doing any attribute packing. This path is rarely used, since most use cases want to compress the results of rendering. We use a pixel shader, but could use a compute shader which batches multiple pages.

◆ CopyPagesToOutput()

void RuntimeVirtualTexture::CopyPagesToOutput ( FRDGBuilder GraphBuilder,
FBatchRenderContext const &  BatchRenderContext 
)

Copy all pages in a batch to the final output textures.

◆ CreateRuntimeVirtualTexturePassProcessor()

FMeshPassProcessor * RuntimeVirtualTexture::CreateRuntimeVirtualTexturePassProcessor ( ERHIFeatureLevel::Type  FeatureLevel,
const FScene Scene,
const FSceneView InViewIfDynamicMeshCommand,
FMeshPassDrawListContext InDrawListContext 
)

Registration for virtual texture command caching pass

◆ CreateStreamingTextureProducer()

IVirtualTexture * RuntimeVirtualTexture::CreateStreamingTextureProducer ( UVirtualTexture2D InStreamingTexture,
FVTProducerDescription const &  InOwnerProducerDesc,
FVTProducerDescription OutStreamingProducerDesc 
)

Helper function to create a streaming virtual texture producer.

◆ FinalizePageBatch()

void RuntimeVirtualTexture::FinalizePageBatch ( FRDGBuilder GraphBuilder,
FBatchRenderContext const &  InBatch 
)

Finalize all pages in a context to their final physical location.

◆ GatherMeshesToDraw()

void RuntimeVirtualTexture::GatherMeshesToDraw ( FDynamicPassMeshDrawListContext DynamicMeshPassContext,
FRDGBuilder GraphBuilder,
FScene Scene,
FViewInfo View,
ERuntimeVirtualTextureMaterialType  MaterialType,
int32  RuntimeVirtualTextureId,
uint8  vLevel,
uint8  MaxLevel,
bool  bAllowCachedMeshDrawCommands 
)

Collect meshes to draw.

◆ GetAstcParametersUniformBufferRef()

const TUniformBufferRef< FAstcParameters > & RuntimeVirtualTexture::GetAstcParametersUniformBufferRef ( )

◆ GetDebugMipLevelColor()

FLinearColor RuntimeVirtualTexture::GetDebugMipLevelColor ( bool  bInAllowMipDebug,
uint32  InLevel,
uint32  InTileAndBorderSize 
)

Get the debug color to use for a given mip level. Returns InDefaultColor if mip debugging is disabled.

◆ GetEtcParametersUniformBufferRef()

const TUniformBufferRef< FEtcParameters > & RuntimeVirtualTexture::GetEtcParametersUniformBufferRef ( )

◆ GetRuntimeVirtualTextureSceneIndex_GameThread()

uint32 RuntimeVirtualTexture::GetRuntimeVirtualTextureSceneIndex_GameThread ( URuntimeVirtualTextureComponent InComponent)

This function is deprecated!

◆ IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT() [1/2]

RuntimeVirtualTexture::IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT ( FAstcParameters  ,
"AstcParameters"   
)

◆ IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT() [2/2]

RuntimeVirtualTexture::IMPLEMENT_GLOBAL_SHADER_PARAMETER_STRUCT ( FEtcParameters  ,
"EtcParameters"   
)

◆ IMPLEMENT_SHADER_TYPE() [1/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( FShader_VirtualTextureCopy_VS  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CopyVS")  ,
SF_Vertex   
)

◆ IMPLEMENT_SHADER_TYPE() [2/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::BaseColor >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CompressBaseColorCS")  ,
SF_Compute   
)

◆ IMPLEMENT_SHADER_TYPE() [3/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Roughness >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CompressBaseColorNormalRoughnessCS")  ,
SF_Compute   
)

◆ IMPLEMENT_SHADER_TYPE() [4/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CompressBaseColorNormalSpecularCS")  ,
SF_Compute   
)

◆ IMPLEMENT_SHADER_TYPE() [5/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular_Mask_YCoCg >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CompressBaseColorNormalSpecularMaskYCoCgCS")  ,
SF_Compute   
)

◆ IMPLEMENT_SHADER_TYPE() [6/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular_YCoCg >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CompressBaseColorNormalSpecularYCoCgCS")  ,
SF_Compute   
)

◆ IMPLEMENT_SHADER_TYPE() [7/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::Displacement >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CompressDisplacementCS")  ,
SF_Compute   
)

◆ IMPLEMENT_SHADER_TYPE() [8/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCompress_CS< ERuntimeVirtualTextureMaterialType::Mask4 >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CompressMask4CS")  ,
SF_Compute   
)

◆ IMPLEMENT_SHADER_TYPE() [9/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::BaseColor >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CopyBaseColorPS")  ,
SF_Pixel   
)

◆ IMPLEMENT_SHADER_TYPE() [10/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CopyBaseColorNormalSpecularPS")  ,
SF_Pixel   
)

◆ IMPLEMENT_SHADER_TYPE() [11/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular_Mask_YCoCg >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CopyBaseColorNormalSpecularMaskYCoCgPS")  ,
SF_Pixel   
)

◆ IMPLEMENT_SHADER_TYPE() [12/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::BaseColor_Normal_Specular_YCoCg >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CopyBaseColorNormalSpecularYCoCgPS")  ,
SF_Pixel   
)

◆ IMPLEMENT_SHADER_TYPE() [13/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::Mask4 >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CopyMask4PS")  ,
SF_Pixel   
)

◆ IMPLEMENT_SHADER_TYPE() [14/14]

RuntimeVirtualTexture::IMPLEMENT_SHADER_TYPE ( template<>  ,
FShader_VirtualTextureCopy_PS< ERuntimeVirtualTextureMaterialType::WorldHeight >  ,
TEXT("/Engine/Private/VirtualTextureCompress.usf")  ,
TEXT("CopyWorldHeightPS")  ,
SF_Pixel   
)

◆ IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT()

RuntimeVirtualTexture::IMPLEMENT_STATIC_UNIFORM_BUFFER_STRUCT ( FRuntimeVirtualTexturePassParameters  ,
"RuntimeVirtualTexturePassParameters"  ,
DeferredDecals   
)

Parameters used when writing to the virtual texture. Uniform buffer for writing to the virtual texture. We reuse the DeferredDecals UB slot, which can't be used at the same time. This avoids the overhead of a new slot.

◆ IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE() [1/6]

RuntimeVirtualTexture::IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE ( FMaterialPolicy_BaseColor  ,
BaseColor   
)

◆ IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE() [2/6]

RuntimeVirtualTexture::IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE ( FMaterialPolicy_BaseColorNormalRoughness  ,
BaseColorNormalRoughness   
)

◆ IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE() [3/6]

RuntimeVirtualTexture::IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE ( FMaterialPolicy_BaseColorNormalSpecular  ,
BaseColorNormalSpecular   
)

◆ IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE() [4/6]

RuntimeVirtualTexture::IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE ( FMaterialPolicy_Displacement  ,
Displacement   
)

◆ IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE() [5/6]

RuntimeVirtualTexture::IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE ( FMaterialPolicy_Mask4  ,
Mask4   
)

◆ IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE() [6/6]

RuntimeVirtualTexture::IMPLEMENT_VIRTUALTEXTURE_SHADER_TYPE ( FMaterialPolicy_WorldHeight  ,
WorldHeight   
)

◆ InitPageBatch()

FBatchRenderContext const * RuntimeVirtualTexture::InitPageBatch ( FRDGBuilder GraphBuilder,
FRenderPageBatchDesc const &  InDesc 
)

Get a context for rendering a batch of pages.

◆ IsMaterialTypeSupported() [1/2]

bool RuntimeVirtualTexture::IsMaterialTypeSupported ( ERuntimeVirtualTextureMaterialType  MaterialType)

Get if the material type is supported. Individual material types can be disabled in project settings to reduce shader permutations.

◆ IsMaterialTypeSupported() [2/2]

bool RuntimeVirtualTexture::IsMaterialTypeSupported ( ERuntimeVirtualTextureMaterialType  MaterialType,
EShaderPlatform  InPlatform 
)

◆ IsSceneReadyToRender()

RENDERER_API bool RuntimeVirtualTexture::IsSceneReadyToRender ( FSceneInterface Scene)

Returns true if the scene is initialized for rendering to runtime virtual textures. Always check this before calling RenderPages().

◆ MeshPassPrologue()

void RuntimeVirtualTexture::MeshPassPrologue ( FRHICommandList RHICmdList,
FIntRect const &  InViewRect,
int32  InPageIndex,
EShaderPlatform  InShaderPlatform 
)

Mesh render pass prologue to set the viewport. Also applies a page corruption workaround when that is enabled.

◆ REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR() [1/2]

RuntimeVirtualTexture::REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR ( VirtualTexturePass  ,
CreateRuntimeVirtualTexturePassProcessor  ,
EShadingPath::Deferred  ,
EMeshPass::VirtualTexture  ,
EMeshPassFlags::CachedMeshCommands   
)

◆ REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR() [2/2]

RuntimeVirtualTexture::REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR ( VirtualTexturePassMobile  ,
CreateRuntimeVirtualTexturePassProcessor  ,
EShadingPath::Mobile  ,
EMeshPass::VirtualTexture  ,
EMeshPassFlags::CachedMeshCommands   
)

◆ RenderPage()

void RuntimeVirtualTexture::RenderPage ( FRDGBuilder GraphBuilder,
FBatchRenderContext const &  BatchRenderContext,
int32  PageIndex 
)

Render a single page from a batch. todo[vt]: Can we add some batch rendering mesh pass where all prerequesite BuildRenderingCommands/Compute phases are batched and then all Graphics draws are batched.

◆ RenderPageBatch()

void RuntimeVirtualTexture::RenderPageBatch ( FRDGBuilder GraphBuilder,
FBatchRenderContext const &  InBatch 
)

Do rendering for all pages in a context.

◆ RenderPages()

RENDERER_API void RuntimeVirtualTexture::RenderPages ( FRDGBuilder GraphBuilder,
FRenderPageBatchDesc const &  InDesc 
)

Render a batch of pages for a runtime virtual texture.

◆ RenderPagesStandAlone()

void RuntimeVirtualTexture::RenderPagesStandAlone ( FRDGBuilder GraphBuilder,
FRenderPageBatchDesc const &  InDesc 
)
inline

◆ UseAstcHighProfile()

bool RuntimeVirtualTexture::UseAstcHighProfile ( EShaderPlatform  ShaderPlatform)

◆ UseAstcProfile()

bool RuntimeVirtualTexture::UseAstcProfile ( EShaderPlatform  ShaderPlatform)

◆ UseEtcProfile()

bool RuntimeVirtualTexture::UseEtcProfile ( EShaderPlatform  ShaderPlatform)

◆ UseRGBA16()

bool RuntimeVirtualTexture::UseRGBA16 ( EShaderPlatform  ShaderPlatform)

For platforms that do not support 2-channel images, write 64bit compressed texture outputs into RGBA16 instead of RG32.

Variable Documentation

◆ RenderCaptureNextRVTPagesDraws

int32 RuntimeVirtualTexture::RenderCaptureNextRVTPagesDraws = 0