Navigation
API > API/Runtime > API/Runtime/Engine
Adapter object that wraps a regular UTexture and allows it to be referenced as a virtual texture in materials. The virtual texture pages are filled on demand by copying from the wrapped texture. This isn't memory efficient or performant, but can be useful for certain debugging or previewing modes where we don't want to change the material, but do want to bind a non-virtual texture to an existing virtual texture sample.
| Name | UVirtualTextureAdapter |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/VT/VirtualTextureAdapter.h |
| Include Path | #include "VT/VirtualTextureAdapter.h" |
Syntax
UCLASS (ClassGroup=Rendering, BlueprintType, MinimalAPI)
class UVirtualTextureAdapter : public UTexture
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UStreamableRenderAsset → UTexture → UVirtualTextureAdapter
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UVirtualTextureAdapter
(
const FObjectInitializer& ObjectInitializer |
VT/VirtualTextureAdapter.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bUseDefaultTileSizes | bool | Set to true if we want to use the default project virtual texture tile settings. | VT/VirtualTextureAdapter.h |
|
| OverrideWithTextureFormat | TObjectPtr< class UTexture2D > | Optional UTexture object that has the final texture format that we would like to use. | VT/VirtualTextureAdapter.h |
|
| Texture | TObjectPtr< UTexture > | The UTexture object to wrap. | VT/VirtualTextureAdapter.h |
|
| TileBorderSize | int32 | Page tile border size. (Will be rounded up to multiple of 2). | VT/VirtualTextureAdapter.h |
|
| TileSize | int32 | Page tile size. (Will be rounded up to power of 2). | VT/VirtualTextureAdapter.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Flush
(
FBox2f const& UVRect |
Flush the virtual texture page contents. | VT/VirtualTextureAdapter.h |
Overridden from UTexture
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FTextureResource * CreateResource() |
Implemented by subclasses to create a new resource for the texture. | VT/VirtualTextureAdapter.h | |
virtual EMaterialValueType GetMaterialType() |
VT/VirtualTextureAdapter.h | ||
virtual uint32 GetSurfaceArraySize() |
VT/VirtualTextureAdapter.h | ||
virtual float GetSurfaceDepth() |
VT/VirtualTextureAdapter.h | ||
virtual float GetSurfaceHeight() |
VT/VirtualTextureAdapter.h | ||
virtual float GetSurfaceWidth() |
VT/VirtualTextureAdapter.h | ||
virtual ETextureClass GetTextureClass() |
Get Texture Class | VT/VirtualTextureAdapter.h | |
virtual bool IsCurrentlyVirtualTextured () |
Returns if the texture is actually being rendered using virtual texturing right now. | VT/VirtualTextureAdapter.h |