![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <AdaptiveVirtualTexture.h>
Inheritance diagram for FAdaptiveVirtualTexture:Classes | |
| struct | FAllocatedInfo |
| struct | FProducerInfo |
Static Public Member Functions | |
| static void | QueuePackedAllocationRequests (FVirtualTextureSystem *InSystem, TConstArrayView< uint32 > InRequests, uint32 InFrame) |
Protected Member Functions | |
| virtual void | Destroy (class FVirtualTextureSystem *InSystem) override |
Protected Member Functions inherited from IAdaptiveVirtualTexture | |
| virtual | ~IAdaptiveVirtualTexture () |
Concrete implementation of an adaptive virtual texture. This allocates multiple virtual textures within the same space: one each for a grid of UV ranges, and an additional persistent one for the low resolution mips. We then use an additional page table indirection texture in the shader to select the correct page table address range for our sampled UV. We use the virtual texture feedback to decide when to increase or decrease the resolution of each UV range. When we change resolution for a range we directly remap the page table entires. This removes the cost and any visual glitch from regenerating the pages.
| FAdaptiveVirtualTexture::FAdaptiveVirtualTexture | ( | FAdaptiveVTDescription const & | InAdaptiveDesc, |
| FAllocatedVTDescription const & | InAllocatedDesc | ||
| ) |
| void FAdaptiveVirtualTexture::ApplyPageTableUpdates | ( | FVirtualTextureSystem * | InSystem, |
| FRDGBuilder & | GraphBuilder, | ||
| FRDGExternalAccessQueue & | ExternalAccessQueue | ||
| ) |
Apply any page table updates.
RDG parameters for update pass.
|
overrideprotectedvirtual |
Implements IAdaptiveVirtualTexture.
|
overridevirtual |
Get the persistent allocated virtual texture for low mips from the adaptive virtual texture.
Implements IAdaptiveVirtualTexture.
| void FAdaptiveVirtualTexture::GetAllocatedVirtualTextures | ( | FBox2D const & | InUVRegion, |
| uint32 | InLevel, | ||
| TArray< FAllocatedInfo > & | OutInfos, | ||
| TArray< uint32 > & | OutAllocationRequests | ||
| ) |
Get internal allocated virtual textures that touch the texture UV region.
| uint32 FAdaptiveVirtualTexture::GetPackedAllocationRequest | ( | uint32 | vAddress, |
| uint32 | vLevelPlusOne, | ||
| uint32 | Frame | ||
| ) | const |
Get a packed allocation key based on a virtual texture feedback request. The virtual texture system collects these opaque keys before queuing them for processing.
| void FAdaptiveVirtualTexture::GetProducers | ( | FIntRect const & | InTextureRegion, |
| uint32 | InMaxLevel, | ||
| TArray< FProducerInfo > & | OutProducerInfos | ||
| ) | const |
Get internal producers that touch the texture texel region.
|
overridevirtual |
Implements IAdaptiveVirtualTexture.
| void FAdaptiveVirtualTexture::Init | ( | FRHICommandListBase & | RHICmdList, |
| FVirtualTextureSystem * | InSystem | ||
| ) |
Initialize the object. This creates the persistent low mips allocated VT.
|
static |
Queue a batch of allocation requests. This static function relays the global requests to the individual object queues. Internally it sorts the requests.
| void FAdaptiveVirtualTexture::QueuePackedAllocationRequests | ( | TConstArrayView< uint32 > | InRequests, |
| uint32 | InFrame | ||
| ) |
Queue a batch of allocation requests. These will be used to reallocate any virtual textures during the next call to UpdateAllocations().
| void FAdaptiveVirtualTexture::UpdateAllocations | ( | FVirtualTextureSystem * | InSystem, |
| FRHICommandListImmediate & | RHICmdList, | ||
| uint32 | InFrame | ||
| ) |
Update any allocations based on recent requests.